Generate Typescript code from a C# class definition.
With this Visual Studio extension, you can define your data structure and validation rules in C# once, and then apply the same definition in your React code without re-coding. It includes
Support for C# nullable types.
Support for C# enums, interfaces, and classes with inheritance hierarchies from multiple namespaces.
Support generic types. For generating React Hook Form resolvers and React + Bootstrap forms, generic types with specific type parameters are supported.
Utilization of C# attributes for TypeScript data validation, variable names, label text, error messages, displayed texts for enumerated values, and more.
Customizable column count in generated TypeScript XML forms.
Process CustomValidationAttribute. The TypeScript generated for CustomValidationAttribute contains commented C# source code and needs to be updated manually.
When you change your output folder path or save a TypeScript file in a project for the first time, CSharpToTypeScript will attempt to save the path of your selected output folder in your project file. For example, if your selected output folder is C:\src\components\viewModels, CSharpToTypeScript will try to add it to your project file: