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
Install jest in a TypeScript project
a. mkdir jest-bug && cd jest-bug
b. yarn init (hit enter until done)
c. yarn add typescript jest
d. yarn run tsc --init
e. Open your favorite editor that can use the LSP of the currently installed TS
This is a type error because the import becomes a namespace:
Additional context
This happens with TypeScript 4.7.3 at least. It's failing type checks in one of our projects (though I suspect we have a misconfiguration to fail on third-party code types like this).
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Version
28.1.1
Steps to reproduce
jest
in a TypeScript projecta.
mkdir jest-bug && cd jest-bug
b.
yarn init
(hit enter until done)c.
yarn add typescript jest
d.
yarn run tsc --init
e. Open your favorite editor that can use the LSP of the currently installed TS
node_modules/jest-runtime/build/index.d.ts
Expected behavior
No type errors.
Actual behavior
The code in the .d.ts file has:
This is a type error because the import becomes a namespace:
Additional context
This happens with TypeScript 4.7.3 at least. It's failing type checks in one of our projects (though I suspect we have a misconfiguration to fail on third-party code types like this).
Environment
System: OS: macOS 12.4 CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz Binaries: Node: 18.3.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 8.11.0 - /usr/local/bin/npm npmPackages: jest: ^28.1.1 => 28.1.1
The text was updated successfully, but these errors were encountered: