Convert C# Models, ViewModels and DTOs into their TypeScript equivalents using webapps, CLI Tool or VSCode extension. Links: https://marketplace.visualstudio.com/items?itemName=adrianwilczynski.csharp-to-typescript - https://csharptotypescript.azurewebsites.net - https://adrianwilczynski.github.io/CSharpToTypeScript/ - https://www.nuget.org/packages/CSharpToTypeScript.CLITool/
Since non-primitives in C# are nullable, would it make sense if all the transformed non-primitive fields in the TypeScript interfaces also get nullable?
Example: Suppose we have a C# class ExampleClass with one field a of type NestedClass. Then the transformed TypeScript interface could automatically be:
Since non-primitives in C# are nullable, would it make sense if all the transformed non-primitive fields in the TypeScript interfaces also get nullable?
Example: Suppose we have a C# class ExampleClass with one field
a
of type NestedClass. Then the transformed TypeScript interface could automatically be:export interface ExampleClass { a: NestedClass | null; }
instead of
export interface ExampleClass { a: NestedClass; }