All Projects → mono → TsToCSharp

mono / TsToCSharp

Licence: MIT license
Emit C# strongly typed interface code from TypeScript definition files.

Programming Languages

typescript
32286 projects
C#
18002 projects
javascript
184084 projects - #8 most used programming language
smalltalk
420 projects

TsToCSharp

Emit C# strongly typed interface code from TypeScript definition files.

This project is intended to read in TypeScript (.d.ts) defintions files and generate as closely as possible a C# strongly typed API for use from either WebAssembly code or .NET hosted in Electron.

Current Work

This is a work in progress, and we are only getting started.

Only the very basic TypeScript AST parsing is present at this time. Mostly the basic types like interface, boolean, number, arrays, properties, methods and a handful of there associated complex types like string | null, number | null, boolean | null etc.

Getting Started

  1. Installing
  2. Usage
  3. TypeScript to C# mapping
  4. Examples
  5. Unit Tests

Obtaining Definition files

Definitions files describe the shape of JavaScript to the TypeScript compiler and are used only to compile.

The Definitely Typed github repository contains a large collection of TypeScript type definitions (.d.ts).

Suggested resources on Definition Files

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].