-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(queryClient): make sure that setQueryData can return undefined from the updater function on type level #3615
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
Conversation
…om the updater function on type level the only runtime tests we had didn't use the previous value, so the generic defaults to unknown; the TS error becomes apparent when providing a generic to setQueryData
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9d5931a:
|
Codecov Report
@@ Coverage Diff @@
## beta #3615 +/- ##
=======================================
Coverage 96.93% 96.93%
=======================================
Files 48 48
Lines 2383 2383
Branches 709 709
=======================================
Hits 2310 2310
Misses 71 71
Partials 2 2
Continue to review full report at Codecov.
|
🎉 This PR is included in version 4.0.0-beta.12 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi, guys! |
@vladyslavNiemtsev good point, it's missing there as well. would you like to contribute it? |
@TkDodo Thanks for this quick PR! |
the only runtime tests we had didn't use the previous value, so the generic defaults to unknown; the TS error becomes apparent when providing a generic to setQueryData