jburzynski / TypeGen

Single-class-per-file C# to TypeScript generator
MIT License
195 stars 55 forks source link

Typescript-only members #166

Closed mispencer closed 1 year ago

mispencer commented 1 year ago

I would like to be able to create members in the generated TS classes that don't exist in the source C# classes.

Rationale: I am using this to type JSON created by my service, however the JSON generated does not exactly match the source C# classes.

Possible Workaround: Custom typescript that references the generate TS files Problems: Only suitable for top-level types. Changes to types nested in other types required customized all containing types and their containing types all the way up the tree. Potentially very many custom types if nested within many top-level types with many levels of nesting.

Possible Workaround: Problem: Requires checking in generated TS files. Generated files containing manual changes is unexpected and easily missable.

jburzynski commented 1 year ago

Implemented in version 4.5.0 by merging #167