We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Both unbuild@latest (2) and unbuild@rc (3rc7) NodeJS 20
https://github.com/NamesMT/sencrypt
I am trying to re-export the class SHash as a type-only export:
SHash
export type { SHash } from '@namesmt/shash' // Also tried this syntax: export { type SHash } from '@namesmt/shash'
But the index.d.mts declaration result is:
index.d.mts
export { SHash } from '@namesmt/shash';
Which is not correct and in the IDE of the end-user it seemed like they could import and use SHash as a class, but it will error at runtime.
No response
The text was updated successfully, but these errors were encountered:
Refer to source, unbuild use rollup-plugin-dts to generate d.ts.
d.ts
So it is a issue of rollup-plugin-dts. Consider the plugin has been in Maintenance Mode, maybe it will be a long time to resolve it...
Sorry, something went wrong.
I have a simular issue. my dts generated a _mergeNamespaces function, which just a "any" wrap 🤔
_mergeNamespaces
source:
export * as Rx from 'rxjs'
generated:
import * as rxjs from 'rxjs'; function _mergeNamespaces(n, m) { m.forEach(function (e) { e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) { if (k !== 'default' && !(k in n)) { var d = Object.getOwnPropertyDescriptor(e, k); Object.defineProperty(n, k, d.get ? d : { enumerable: true, get: function () { return e[k]; } }); } }); }); return Object.freeze(n); } var rx = /*#__PURE__*/_mergeNamespaces({ __proto__: null }, [rxjs]); export { rx as Rx };
No branches or pull requests
Environment
Both unbuild@latest (2) and unbuild@rc (3rc7)
NodeJS 20
Reproduction
https://github.com/NamesMT/sencrypt
Describe the bug
I am trying to re-export the class
SHash
as a type-only export:But the
index.d.mts
declaration result is:Which is not correct and in the IDE of the end-user it seemed like they could import and use SHash as a class, but it will error at runtime.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: