Open
Description
Bug Report
NodeNext resolution failed to resolve dual-package correctly
🔎 Search Terms
NodeNext
🕗 Version & Regression Information
- Never worked
💻 Code
https://github.com/Jack-Works/ts-nodenext-wrong-resolution-reproduction
where node_modules/testpkg/package.json
is
{
"name": "testpkg",
"exports": {
".": {
"types": "./dist/type.d.ts",
"require": "./dist/common.cjs",
"import": "./dist/module.mjs"
}
}
}
TypeScript should resolve type.d.ts
in dual mode instead of CommonJS synthetic export.
🙁 Actual behavior
src/index.ts:2:1 - error TS2349: This expression is not callable.
Type 'typeof import("testpkg/dist/type")' has no call signatures.
🙂 Expected behavior
No error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment