From 64d7fdaf9897718428c2b0eb611f14347b9ed621 Mon Sep 17 00:00:00 2001 From: Wayne Van Son Date: Fri, 20 May 2022 07:02:28 +1000 Subject: [PATCH 1/3] docs: advise users to install typescript types --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 1778f8fe..4cb02caf 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,18 @@ setupFilesAfterEnv: ['/jest-setup.js'] ### With TypeScript +Install the Typescript types via your package manager. + +```sh +# for npm +npm install -D @types/testing-library__jest-dom +``` + +```sh +# for yarn +yarn add -D @types/testing-library__jest-dom +``` + If you're using TypeScript, make sure your setup file is a `.ts` and not a `.js` to include the necessary types. From 8d97362d8343e94f80b3927b65025fbe8e4adecf Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Mon, 19 Sep 2022 06:44:45 -0400 Subject: [PATCH 2/3] docs: advise pnpm users to install typescript types --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 4cb02caf..2f2b880a 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,11 @@ npm install -D @types/testing-library__jest-dom yarn add -D @types/testing-library__jest-dom ``` +```sh +# for pnpm +pnpm add -D @types/testing-library__jest-dom +``` + If you're using TypeScript, make sure your setup file is a `.ts` and not a `.js` to include the necessary types. From bb669e6ae0220b2b8be814812077e1e010e9f2e4 Mon Sep 17 00:00:00 2001 From: Wayne Van Son Date: Wed, 21 Sep 2022 22:13:24 +1000 Subject: [PATCH 3/3] docs(types): add note regarding explicit package managers --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2f2b880a..d864bf40 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ setupFilesAfterEnv: ['/jest-setup.js'] ### With TypeScript -Install the Typescript types via your package manager. +Install the Typescript types via your package manager, and usually only needs to be done when your package manager requires all dependencies explicitly installed (pnpm, yarn@>=2). ```sh # for npm