Translates C# DTOs into compatible TypeScript classes


NuGet MyGet CI Build status GitHub issues license

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.


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

Code Example



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:



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:


Contribution is the best way to improve any project!

  1. Fork it!
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

…or follow steps described in a nice fork guide by Karl Broman