Question: Why not include @types/jest as TSDX's dependencies?
See original GitHub issueCurrent Behavior
@types/jest
is in newly generated package’s devDependencies.
Desired Behavior
Why not include @types/jest
as TSDX’s dependencies?
This way, the newly generated boilerplate package’s devDependencis will be cleaner.
Suggested Solution
Actually, if the newly generated boilerplate package’s devDependencis includes only TSDX, that will be awesome, and I think it’s doable.
Who does this impact? Who is this for?
All users
Describe alternatives you’ve considered
None.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Typescript is not picking up Jest types - Stack Overflow
I am using VS Code; I have installed @types/jest; I have attempted to reinstall all my packages; I have reloaded my editor; Here...
Read more >types/jest dependency should be changed to @jest/types #387
Looks like Jest v27 types are not supported by @types/jest and were moved to @jest/types . Suggested solution: Should @types/testing-library__ ...
Read more >types/jest - npm
@types/jest. TypeScript icon, indicating that this package has built-in type declarations · Readme · Code Beta · 2 Dependencies · 7,851 Dependents ...
Read more >Installing ts-jest - Huafu
You can install ts-jest and dependencies all at once with the following commands. Using npm : npm install --save-dev jest typescript ts-jest @types/jest....
Read more >types/jest@26.0.24 - Snyk Vulnerability Database
Learn more about known @types/jest 26.0.24 vulnerabilities and licenses ... This does not include vulnerabilities belonging to this package's dependencies.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t know for sure, but I’m pretty sure the reason for that is historical rather than intentional. TSDX was originally written in JS and most of the tests are still in JS (I’ve got a TODO to rewrite them, hopefully won’t be too hard – EDIT: it wasn’t, see #649).
@types/jest
was only added as a devDep in #146 which added the first and only TS test.Also seems like
@types/shelljs
made its way in as a dep instead of a devDep too in #244PR welcome to change both/either of those. Might need to be careful with the
yarn.lock
file when doing sots-jest
’s installation instructions do say to install@types/jest
.Side note: We’re able to get away with most types as devDeps because TSDX is a CLI and so not generally imported into any TS code
Please don’t bloat dependencies, it requires maintaining, updating and time to download/install for every deploy