The answer of Alexander works, but if you want to exclude empty objects you can do this:
type HasTemplateProperty<T> = keyof T extends infer K
? K extends string
? K extends `_${string}`
? true
: false
: false
: false;
type testA3 = HasTemplateProperty<{}>; // => never