Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.
/ TsToCSharp Public archive

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

License

Notifications You must be signed in to change notification settings

mono/TsToCSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published