- Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
For TS project having "moduleResolution": "NodeNext" in tsconfig.json and "type": "module" in package.json, TypeScript can't resolve to correct types.
import parseGitDiffExport from 'parse-git-diff'; // This expression is not callable. // Type 'typeof import("node_modules/parse-git-diff/build/types/index")' has no call signatures.ts(2349) parseGitDiffExport(diff);This is how TypeScript's NodeNext mode interacts with CommonJS packages, seems the only fix is to put index.d.ts in both build/cjs and build/mjs and then remove "types" key in exports field.
yeonjuanyeonjuan
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working