-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
update Matchers to Matchers<R,T> #235
update Matchers to Matchers<R,T> #235
Conversation
This is my first PR to this project. Not sure if I need to manually bump V and I also had some issues w/ tests but anecdotally I changed my local node_modules/jest-extended to reflect this change and the build worked |
Additionally, for those getting this error
and needing an immediate fix, you can revert to |
Codecov Report
@@ Coverage Diff @@
## master #235 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 109 109
Lines 554 554
Branches 97 97
=====================================
Hits 554 554 Continue to review full report at Codecov.
|
Thanks for taking action to solve this! I've just run into this issue as well, and had to disable lib check for now... |
This same problem is blocking us from updating to the latest @types/jest |
I made the same change locally, but it is not enough though; the rules await-promise and no-void-expression of TSLint fire out. The issue is that new jest typings also explicitly makes await expect(promise).toReject(); // type is void, not Promise<R> Types of jest itself change the argument from BTW is this project still under maintenance? |
@mattphillips are you still maintaining this project? I appreciate the upstream types have changed under your feet but this PR has been open for almost a month now and is holding upgrades back in my app. |
Note to people who've been hit by this issue, check out if |
@Seally You can also add a file |
@mattphillips Thanks for the package, but now it incompatible with newer versions of |
@gcangussu Have you managed to make it work? I've tried that (including the use of |
"Overriding" the types using |
@InExtremaRes You need to make sure you are adding it to your project on the |
You need to explicitly specify the order of @types directories in typeRoots option. For example, if you have folders «node_modules/@types» and «src/@types», the first should be «src/@types». |
👋 @stephtr Can we merge this PR into master or is there any reason why is being blocked? |
Thanks for bringing it to my attention and sorry, that nobody cared about it for such a long time. |
Hmm, seems like it has always been @mattphillips, who has published the latest release on Jul 9, 2019. Not sure if he has other maintainers to help out... Hopefully, he will check in soon 🤞 |
I wouldn’t get your hopes up, this project is dead... Someone should clone and allow more than 1 maintainer for it to be successful. |
Hey all sorry for the delay in coming to this!!! It looks to me like @types/jest types are actually incorrect. I've opened a PR (DefinitelyTyped/DefinitelyTyped#41766) to fix them which should mean this change is redundant. In the meantime though I will release this a fix for this |
Fix released in: https://www.npmjs.com/package/jest-extended/v/0.11.3 |
@mattphillips Thank you for merging, but as I mentioned previously this change is not enough. The types of toResolve(): Promise<R>; // or maybe Promise<void> directly
toReject(): Promise<R>; instead of just returning The change comes from jest now wrapping the type in a
|
Hey @InExtremaRes sorry I missed your comment - just published:
in: https://www.npmjs.com/package/jest-extended/v/0.11.4 Let me know if there are any other issues :) |
@mattphillips Thanks a lot |
What
@types/jest changed Matchers to be
Matchers<R,T>
this change is just supporting thatWhy
npm build will fail for TS projects with both [email protected] and @types/[email protected]
Notes
Housekeeping