TypeStrong / dts-bundle

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

Allow multiple ambient declarations for same module #78

Open arshaw opened 5 years ago

arshaw commented 5 years ago

Writing ambient modules introduces the possibility of having multiple module declarations of the same name. dts-bundle chokes on this and says "already got export for...". I've modified the code to keep track of an array of module definitions in order to accommodate this use case. Fixes #72

It's unclear to me if the "already got export for" error is ever desirable for non-ambient modules, but my gut tells me no.

CC @eddow

arshaw commented 5 years ago

Travis is failing due to reasons unrelated to my code:

Running "mochaTest:all" (mochaTest) task
Warning: /home/travis/build/TypeStrong/dts-bundle/node_modules/grunt-mocha-test/node_modules/mocha/node_modules/debug/src/node.js:120
exports.inspectOpts = Object.keys(process.env).filter(key => {
                                                          ^^
Unexpected token => Use --force to continue.