I built a TypeScript library that is the "Core" to my application (call it Core.ts) using internal modules and a single class per file approach compiled to a single output file(Core.js). I added --declaration flag to compiler and it generates the declaration file (Core.d.ts). Problem is, this generated declaration file didn't include the references to other declaration files originally included in the compilation. Once I add the generated Core.d.ts to my project I get something like 1k errors about undefined JQuery, Backbone, etc... coming from that file.
I have the comments flag set to true and it generated the comments and references in Core.js but stripped them all away for Core.d.ts
If I look at other definition files I grabbed from Definitely Typed some do include references to other definition files so this seems like a bug that the compiler is stripping them away despite comments flag being set to true.
Please advise.
Seems this issue has been encountered but never looked into: