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
For TS project having "moduleResolution": "NodeNext" in tsconfig.json and "type": "module" in package.json, TypeScript can't resolve to correct types.
importparseGitDiffExportfrom'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.
The text was updated successfully, but these errors were encountered:
For TS project having
"moduleResolution": "NodeNext"
intsconfig.json
and"type": "module"
inpackage.json
, TypeScript can't resolve to correct types.This is how TypeScript's
NodeNext
mode interacts with CommonJS packages, seems the only fix is to putindex.d.ts
in bothbuild/cjs
andbuild/mjs
and then remove"types"
key inexports
field.The text was updated successfully, but these errors were encountered: