Open thebuilder opened 3 years ago
Would it make sense to be able to control how reference types are handled?
Yeah I think that's a great idea. If you're up for it feel free to submit a PR for adding a setting like this.
Thanks for the suggestion!
Hey, really cool tool. Tried it on on set of c# code models we have to compare it to our TypeScript models. This does reveal one issue - some types like
string
could be nullable by default. https://docs.microsoft.com/en-us/dotnet/csharp/nullable-referencesAn example would be the following conversion:
The problem is, these values could actually be
null
, orundefined
(depending on how you ship the data). TypeScript would not throw an error if you try to use astring
method on on any of thestring
values.Would it make sense to be able to control how reference types are handled?