Translates C# DTOs into compatible TypeScript classes
Please notice that while this project acknowledges the idea of Semantic Versioning, it is not really followed until
v1.0.0 is released. In other words, as of now the API is a subject to change without any prior notice. Stable API is a part of
v1.0.0 requirements, and when it is release, any new releases with breaking changes will affect the major version of the package.
v0.0.1 (alpha)Released v0.0.2 (alpha)Released
- v0.0.3 (alpha) Current
- v0.0.4 (alpha)
- v1.0.0 (release)
Launch CSharpToTypeScript from console
# from <repoRoot> dotnet restore # from ./CSharpToTypeScript.Tests execute dotnet build dotnet test # from ./CSharpToTypeScript execute dotnet build dotnet run -- -c ../CSharpToTypeScript.Tests/TestFiles/sample.debug.cfg.json
Manual maintainance of compatible C# data transfer objects (DTO) and their TypeScript counterparts has always been burdensome. This library is intended to help generating TypeScript enums and classes based on C# type definitions.
List of NuGet packages built from this codebase:
CSharpToTypeScript.Core Default implementation of the translating library.
CSharpToTypeScript.SimpleInjector Provides default IoC setup using SimpleInjector as a framework.
CSharpToTypeScript A console application that binds things together and lets translation from command line (see syntax above).
Unit tests are available in CSharpToTypeScript.Tests project.
The code is distributed under the MIT license.
Reporting an Issue
Reporting an issue, proposing a feature, or asking a question are all great ways to improve software quality.
Here are a few important things that package contributors will expect to see in a new born GitHub issue:
- the relevant version of the package;
- the steps to reproduce;
- the expected result;
- the observed result;
- some code samples illustrating current inconveniences and/or proposed improvements.
Contribution is the best way to improve any project!
- Fork it!
- Create your feature branch (
git checkout -b my-new-feature).
- Commit your changes (
git commit -am 'Added some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request
…or follow steps described in a nice fork guide by Karl Broman