Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: @jest/types vs community @types/jest packages #9972

Closed
eldarshamukhamedov opened this issue May 5, 2020 · 3 comments
Closed

Question: @jest/types vs community @types/jest packages #9972

eldarshamukhamedov opened this issue May 5, 2020 · 3 comments

Comments

@eldarshamukhamedov
Copy link

Couldn't find anything in the README about the intended use for @jest/types. I can see that some of the packages directly reference it, but the package behaves differently to the community @types/jest package. It doesn't appear to add any global type declarations. This leaves me with two questions:

  1. Is @jest/types meant to be a drop-in replacement for @types/jest, or is it only used internally in the Jest monorepo?
  2. If @jest/types is meant to replace @types/jest, are there any usage examples (outside of the Jest monorepo, ideally) that you can point me to?

Thanks in advance! 🙂

@SimenB
Copy link
Member

SimenB commented May 5, 2020

@jest/types are for the shared types of Jest's packages - useful if building an integration with Jest itself or one of its modules.

@types/jest will stick Jest's globals into your environment. We have no plans to replace that, although I wanna simplify it a bit, see DefinitelyTyped/DefinitelyTyped#44365.


We should be better at adding readmes to all our packages 😬 Most of them exist to reduce the cognitive overhead of working with the internals, and not necessarily for outside consumption. Readmes would clarify that

@SimenB SimenB closed this as completed May 5, 2020
@SimenB SimenB added the Question label May 5, 2020
@eldarshamukhamedov
Copy link
Author

@SimenB thanks for the quick reply! 🙂

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants