I developed a library, which also contains TypeScript files, in Visual Studio 2013. The files are compiling correctly to JS files (AMD).
What I want is to create a single declaration file for this lib, but this does not work:
tsc --declaration --module AMD --out out.d.ts [files.ts]
Can someone please lead me to the right path?
TypeScript 0.9.1.1 is used.
Its because you are providing .d.ts
to out which will overwrite the declaration file with js contents.
Also, you need to remove module amd
because that works on per file basis (not --out friendly, see http://www.youtube.com/watch?v=KDrWLMUY0R0&hd=1)
So, try:
tsc [files.ts] --declaration --out out.js
which will generate out.d.ts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With