Closed
Description
Hello Team,
I've created a lot of generic solutions with TypeScript but always struggled with this one. Is there a way to get all properties defined in TypeScript, but at runtime. For Example
class Car { name: string; }
will compile to var Car = /** @class */ (function () { function Car() { } return Car; }());
Could there be a compiler option which would emit
var Car = /** @class */ (function () { function Car() { this.name = null; } return Car; }());
This would allow us to create better generic solutions with Typescript. I searched a lot and maybe used the wrong search terms, but I could not find a solution to this.