testing-library / jest-dom

:owl: Custom jest matchers to test the state of the DOM

Home Page:https://testing-library.com/docs/ecosystem-jest-dom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

All declarations of 'Matchers' must have identical type parameters.

ManukMamyan opened this issue · comments

  • @testing-library/jest-dom version:
  • node version:
  • npm (or yarn) version:

Relevant code or config:

@testing-library/jest-dom` version:^5.16.5
@types/jest:^29.5.3

interface Matchers<R, T> {}

What you did:

yarn tsc

What happened:

typescript shows error:

Снимок экрана 2023-07-15 в 12 10 17

Reproduction:

Problem description:

Declarations of 'Matchers' type are not identical in @types/testing-library__jest-dom/index.d.ts(21:15) and in expect/build/index.d.ts

Suggested solution:

This problem exists on @types/testing-library__jest-dom": "5.14.7".

I installed 5.14.6 and error was gone (i checked 5.14.8 - works also)

Hi.

Can you be more explicit about what the issue is? Just from the title and that small code block I do not get what the issue is. Please fill in the sections with titles in the template.

Thanks

This appears to be a types issue, rather than a testing-library one: DefinitelyTyped/DefinitelyTyped#65987

(And the template still needs to be filled out for details’ sake.)