TypeStrong / dts-bundle

Export TypeScript .d.ts files as an external module definition
MIT License
308 stars 57 forks source link

Question about unused external typings #8

Closed koloboid closed 8 years ago

koloboid commented 9 years ago

Hello. How to force dts-bundle keep unused external typings in output definition? Thanks for advice.

Bartvds commented 9 years ago

dts-bundle works with what is output by typescript compiler: it starts with main file and then traverses files reachable from there.

sccolbert commented 9 years ago

If typings are included as a reference path, but the referenced file uses global symbols, there will be no import statement required. But the reference path must still be maintained so the dts file is complete.

Edit: I retract my comment, but am leaving it for reference. Including reference paths the bundle is not a good idea, particularly for libraries because it can easily lead to multiple references of a dependency and duplicate identifiers.

tolemac commented 8 years ago

I close it for now.