frhagn / Typewriter

Automatic TypeScript template generation from C# source files
http://frhagn.github.io/Typewriter
Apache License 2.0
536 stars 132 forks source link

Handling Class Constructors? #324

Open s4m0r4m4 opened 4 years ago

s4m0r4m4 commented 4 years ago

Thanks for such a useful plugin!

Is there a way to handle constructors? After reviewing the documentation and open issues here and on stackoverflow, I haven't found anything that indicates that TypeWriter knows about constructors.

Ideally, it would provide the ability to create a typescript constructor that matches the C# one in terms of parameter types and ordering. Right now, I am left to infer the constructor parameters by simply assuming every property is needed in the constructor signature, but this isn't a good long-term solution.