7018666b67
Update to ts morph |
||
---|---|---|
.vscode | ||
docs | ||
src | ||
test | ||
.gitignore | ||
LICENSE.md | ||
README.md | ||
package-lock.json | ||
package.json | ||
tsconfig.json | ||
tslint.json |
README.md
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
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
- TypeScript Handbook - A comprehensive guide to the TypeScript language
- TypeScript Declaration Files - Guide that is designed to teach you how to write a high-quality TypeScript Declaration File.
- Definitely Typed Repository - The repository for high quality TypeScript type definitions.
- Definitely Typed Website - The DefinitelyTyped website.
- Definitely Typed Guides - Creating a definition file.