improve useQuery type overload
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 9401b24318d60cf02903656617173a26cb8cced2:
| Sandbox | Source |
|---|---|
| @tanstack/query-example-react-basic | Configuration |
| @tanstack/query-example-react-basic-typescript | Configuration |
please fix the pipeline (prettier)
please fix the pipeline (prettier)
fixed
Codecov Report
Merging #3909 (9401b24) into main (eab6e2c) will increase coverage by
0.45%. The diff coverage isn/a.
@@ Coverage Diff @@
## main #3909 +/- ##
==========================================
+ Coverage 96.36% 96.81% +0.45%
==========================================
Files 45 57 +12
Lines 2281 2668 +387
Branches 640 784 +144
==========================================
+ Hits 2198 2583 +385
- Misses 80 83 +3
+ Partials 3 2 -1
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update e9d62f4...9401b24. Read the comment docs.
@mh-alahdadian I believe this types improvement requires Typescript 4.2 to work right? Currently we have Types currently require using TypeScript v4.1 or greater Therefore this would be a breaking change and we would need to push it out to next major version.
@mh-alahdadian I believe this types improvement requires Typescript 4.2 to work right? Currently we have Types currently require using TypeScript v4.1 or greater Therefore this would be a breaking change and we would need to push it out to next major version.
Did you test it on TS4.1 and it doesn't work ? I don't know if it requires a special new version of TS , if it didn't worked with 4.1 then I think we can wait for next major version release , or we can add multiple .d files to support multiple ts versions
Thanks for the contribution. Our plan is to remove all overloads eventually, and for now, there is no drawback to stick with the current implementation.