Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Add more explanation to the types FAQ #25

Merged
merged 1 commit into from
Apr 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -17,4 +17,31 @@ For instance, if you have a yarn project, hoisting happens automatically. Howeve
public-hoist-pattern[]=@types*
```

Otherwise, installing `@types/testing-library__jest-dom` as a direct dependency should have the same effect and fix your issue.
Otherwise, installing `@types/testing-library__jest-dom` as a direct dependency should have the same effect and fix your issue.

If you are still experiencing issues after making these changes, it's very likely that your `tsconfig.json` file contains specific type overrides, which means that it will ignore automatic types, for instance:

```json
{
"compilerOptions": {
"types": [
"node",
"mocha",
]
}
}
```

In that case, make sure to add `testing-library__jest-dom` to the `types` array:

```json
{
"compilerOptions": {
"types": [
"node",
"mocha",
"testing-library__jest-dom"
]
}
}
```