In the given scenario:
class Foo {
constructor(
private one: string,
private two: string,
private three: string) {
}
}
Is there a way to create an array containing the type's properties?
For example, I need to generate an array like:
['One', 'Two', 'Three']
It's important to note that I specifically require the properties to be extracted from the type itself, not from an instance. Otherwise, I could simply use Object.keys(instanceOfFoo)
.