Skip to content

fix(breaking): update TS type to match latest @types/jest #92

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

Merged
merged 1 commit into from
Nov 4, 2019

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