You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's definitely a bug. Thanks for the repro, I'll look into it.
As for why there's a ModuleDeclaration in there and we don't do a TypeAliasDeclaration such as you suggest (type B2 = B$1), there's actually a very good reason for it, and you can read more about it here. Classes are treated a little bit different than other types in TypeScript and type aliases cannot be instantiated.
This has been fixed and was caused by the deconflicting logic of the declaration bundler not handling QualifiedName nodes. A new version will be released on NPM shortly containing this fix.
Reproduction
Here's Repl:
https://repl.it/@hdmr14/wrong-type-declaration
Config file:
https://repl.it/@hdmr14/wrong-type-declaration#rollup.config.js
Generated files:
https://repl.it/@hdmr14/wrong-type-declaration#out/index.d.ts
https://repl.it/@hdmr14/wrong-type-declaration#out/index.js
Expected Behavior
it should be based on the generated js code.
or some BWrappers generated?
Actual Behavior
unexpected
BWrapper
generatedThe text was updated successfully, but these errors were encountered: