Skip to content

Conversation

rrufus
Copy link
Contributor

@rrufus rrufus commented Nov 4, 2019

Hi,

the Matchers type of definitelytyped's jest package have been updated: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/jest/index.d.ts#L667

This causes a compilation error since the interfaces don't match any more, e.g.

node_modules/snapshot-diff/index.d.ts:13:13 - error TS2428: All declarations of 'Matchers' must have identical type parameters.

13   interface Matchers<R> {
               ~~~~~~~~

There are several other similar examples e.g.
styled-components/jest-styled-components#270
testing-library/jest-dom#150

@thymikee
Copy link
Member

thymikee commented Nov 4, 2019

I guess it isn't backwards compatible?

@rrufus
Copy link
Contributor Author

rrufus commented Nov 4, 2019

You're right, but users will just need to update their version of @types/jest (as DefinitelyTyped, in keeping with the version of jest, did not increment the major version for this change).

@thymikee thymikee changed the title fix type to match latest in jest fix(breaking): update TS type to match latest @types/jest Nov 4, 2019
@thymikee thymikee merged commit 364280f into jest-community:master Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants