However, typescript relies greatly on definition file of other libraries to use them in typescript programming. Getting those file generated can be frustrating because one needs to generate the declaration from dos-like command using tsc.exe command.
Having worked on a couple of typescript modules that are reusable and I would really like to generate the declaration files for those files easily prompted me to write a Nuget Package that generates typescipt definition file from Nuget Manager Console of Visual Studio.
This package is called TypescriptDeclaration
To install TypescriptDeclaration into your project from Nuget use:
PM> Install-Package TypescriptDeclaration
To use TypescriptDeclaration successfully:
- Typescript must be installed to the default installation folder: c:\Program Files\... or C:\Program Files (x86)\
- The typescript file must be error-free.
To generate declaration file, simple type:
PM> Get-TSD filename.ts
where filename.ts is the name of the typescript file you wish to generate declaration file for. The result looks like this:
PM> Declaration file successfully generated.
Note that you have to manually include the generated description file into your project. Please bear with me as I update the package in my free time tomorrow.