class MyClass {
constructor() {}
aMethod() {}
anotherMethod() {}
aField = 'foo'
anotherField = 42
}
type PropNamesMyClass = PropNames<MyClass>
expectType<TypeEqual<PropNamesMyClass, 'aField' |'anotherField'>>(true)
Original code from https://zirkelc.dev/posts/extract-class-methods
Extract the non-method key names from a class