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

Latest commit

 

History

History
40 lines (21 loc) · 1.81 KB

README.md

File metadata and controls

40 lines (21 loc) · 1.81 KB

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