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
Alternately, run npx @arethetypeswrong/cli --pack in the repository after running tsc.
Expected behavior
Copying the output from ATTW:
❓ The JavaScript appears to set both module.exports and module.exports.default for improved compatibility, but the types only reflect the latter (by using export default). This will cause TypeScript under the node16 module mode to think an extra .default property access is required, which will work at runtime but is not necessary. These types should export = an object with a default property instead of using export default. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/MissingExportEquals.md
┌───────────────────┬───────────────────────┐
│ │ "throttled-queue" │
├───────────────────┼───────────────────────┤
│ node10 │ ❓ Missing `export =` │
├───────────────────┼───────────────────────┤
│ node16 (from CJS) │ ❓ Missing `export =` │
├───────────────────┼───────────────────────┤
│ node16 (from ESM) │ ❓ Missing `export =` │
├───────────────────┼───────────────────────┤
│ bundler │ ❓ Missing `export =` │
└───────────────────┴───────────────────────┘
Additional context
I normally fix this in .ts files with something like :
Describe the bug
With the TSConfig
module
set toNode16
orNodeNext
, trying to call the package's default-import
ed function gives:To Reproduce
Steps to reproduce the behavior:
Alternately, run
npx @arethetypeswrong/cli --pack
in the repository after runningtsc
.Expected behavior
Copying the output from ATTW:
Additional context
I normally fix this in
.ts
files with something like :Would you accept that as a PR?
P.S.
throttled-queue
is really handy, thanks for the package! 🙌The text was updated successfully, but these errors were encountered: