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

Latest commit

 

History

History
50 lines (31 loc) · 1.33 KB

Usage.md

File metadata and controls

50 lines (31 loc) · 1.33 KB

Usage

Using the project is a simple step of executing the project from the command line with a list of files specified.

First you will need a TypeScript (.d.ts) definition file to be used as input.

$ npm start [options] path/to/file/definition.d.ts

By default the generated file will reside in the same path as the definition file and will have a .cs extension.

Command Line Options

All the available command line options can be found in the Generate Options document.

Sample run

npm start ../tests/interface.d.ts

Output:

> [email protected] start /projects/TypeScript/TsToCSharp
> node ./dist/TStoCSharp.js "../tests/interface.d.ts"

Starting Generation for file(s): ../tests/interface.d.ts
Resolving File: ../tests/interface.d.ts => /projects/TypeScript/tests/interface.d.ts

The output will reside in the same directory as /projects/TypeScript/tests/interface.cs.

Using the CLI

If the CLI interface was setup by following the instructions Command Line Interface from the Installing doc then you can simple do the following:

$ TsToCSharp [options] file1.d.ts file2.d.ts

From the Terminal or Command Prompt enter the following:

$ TsToCSharp

And you will be presented with a help screen