I'm trying to build a library of typescript components that will be consumed by another library that is also typescript based. We are currently using webpack to accomplish our bundling, with ts-loader as the loader to consume the TS files.
I'm unsure of how to generate the .d.ts files for the example library below. Typescript does build the .d.ts files (with declaration
set to true) but it is one file per module where I need one .d.ts file that can be used by consumers.
https://github.com/raybooysen/typescript-webpack-example
So my question is, is there a canonical example of how to accomplish this? Is there a way that typescript consumers can import these .d.ts files correctly? At the moment there seems to be very little documentation and examples on the net and would appreciate any help.
I eventually opened an issue on the Typescript Github page and they have confirmed this is not possible:
https://github.com/Microsoft/TypeScript/issues/8372#issuecomment-217219512
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