Create one declaration file for Typescript lib

I am creating a library that also contains Typescript files in VS2013. Files are correctly compiled in js files (AMD).

I want to create one declaration file for this library. But

tsc --declaration --module AMD --out out.d.ts [files.ts]

does not work.

Can anyone lead me to the right path?

TypeScript 0.9.1.1.

+4
source share
3 answers

You can always do this after the fact with command line calls. In Visual Studio, use the following post-build event command line call:

del $(OutDir)combined.d.ts
type $(OutDir)*.d.ts > $(OutDir)combined.d.ts

Perhaps it will be $(ProjectDir)Some\Other\Path\*.d.ts, etc. See here for more

+2
source

, .d.ts, js. , module amd, ( , . http://www.youtube.com/watch?v=KDrWLMUY0R0&hd=1)

, :

tsc [files.ts] --declaration --out out.js

out.d.ts

0

Andy W . FIND .

del "$(ProjectDir)bin\combined.d.ts"
type "$(ProjectDir)*.d.ts" "$(ProjectDir)subFolder1\*.d.ts" "$(ProjectDir)subFolder2\*.d.ts" | FIND /V /I "/// <reference path="  > "$(ProjectDir)bin\combined.d.ts"
0

All Articles