TypeStrong / dts-bundle

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

Add support to export as namespace #70

Open devaradhan opened 5 years ago

devaradhan commented 5 years ago

Thanks for the awesome plugin. It will be cool if we also have support for typings exported as namespace as well. We are creating a bundle with var as library target using webpack, allowing users to use symbol from global namespace directly, without importing. We want to generate d.ts file for this as well.

tonym97 commented 5 years ago

FYI I just added this: if (outputAsModuleFolder) { content += '\nexport as namespace ' + exportName + ';'; }

as a lazy man's way of doing this. Will create a pull request when I can