-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reexporting module as named export for module library #61
Comments
Similar edge case,
Will generate
instead of
|
Hey did you guys find a solution for this? |
Better off writing something of our own at this point... |
Hahaha yeah this is my first time working with declaration files so I'm surprised there's no automated way of creating these that are... more robust. @shanehsu I figured out a workaround that's not too bad using namespaces. You would modify the above example as... mammals.ts export namespace mammals {
export class Monkey { }
export class Lion { }
export class Tiger { }
} index.ts export { mammals } from './mammals'; This actually feels nicer as we don't need to import * as just to export again |
Hi,
I am trying to use dts-bundle to export a bundle as a module library. I am re-exporting all the exports from another file, and while this works without bundling it doesn't seem to when bundled.
My question is really 2-fold.
This is my minimal example. Consider I am trying to publish an 'animals' npm package. It's very simple consisting of the following.
mammals.ts
index.ts
I want to use it as follows within some other code in another module somewhere
zoo.ts
If you create a bundle this using the command
You get the file
bundle.d.ts
which leads to a typescript error 'Cannot find name mammals'
The initial d.ts files look like this:-
mammals.d.ts
index.d.ts
The text was updated successfully, but these errors were encountered: