fix(types): remove non-void constraint from queryFn result#3666
Merged
TkDodo merged 3 commits intoTanStack:betafrom Jun 3, 2022
Merged
fix(types): remove non-void constraint from queryFn result#3666TkDodo merged 3 commits intoTanStack:betafrom
TkDodo merged 3 commits intoTanStack:betafrom
Conversation
|
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 d95571b:
|
Codecov Report
@@ Coverage Diff @@
## beta #3666 +/- ##
=======================================
Coverage 97.11% 97.11%
=======================================
Files 50 50
Lines 2389 2389
Branches 705 705
=======================================
Hits 2320 2320
Misses 67 67
Partials 2 2
Continue to review full report at Codecov.
|
Member
|
🎉 This PR is included in version 4.0.0-beta.20 🎉 The release is available on: Your semantic-release bot 📦🚀 |
GLabat
pushed a commit
to GLabat/react-query
that referenced
this pull request
Jun 27, 2022
…k-beta * 'beta' of https://github.com/TanStack/query: (140 commits) Fix Best of JS badge in README (TanStack#3695) Update config.json docs: adapter teasers docs: rewrite typescript docs tests: stabilize docs: Update graphql.md to fix link (TanStack#3683) docs: fix link typo in README.md (TanStack#3679) Update README.md update readme Update config.json Update index.js examples: vendor to platform directories docs: migrate to tanstack.com fix(persist): introduce in-house synchronous Storage interface (TanStack#3673) docs: restructure migration guide by importance of breaking changes fix: `replaceDeepEqual` special case for non-plain arrays (TanStack#3669) feat: make InfiniteQueryObserver's type more robust (TanStack#3571) fix(types): remove non-void constraint from queryFn result (TanStack#3666) fix(persist): remove environment check (TanStack#3658) fix(types): make sure queryClient.setQueriesData can return undefined from the updater (TanStack#3657) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
discussed in #3541
trying to enforce not-void + not-undefined on the queryFn return type is creating pockets of complexity / unexpected typing behaviour, as TS is trying to both enforce and infer too many things at the same time.
removing for now, and adding some additional tests to check for the pieces that were clashing with the non-void constraint
Promise<any>return typeTQueryFnData