fix(types): prevent type errors and improve inference for dynamic queries on useQueries and useSuspenseQueries (#8624)
* fix(react-query): prevent type errors and improve inference for dynamic queries on useQueries and useSuspenseQueries Previously, using useQueries and useSuspenseQueries with a dynamic array of mixed queries caused type errors. This commit ensures that type errors no longer occur and that the returned data is correctly inferred (e.g., as (number | boolean | undefined)[]) instead of unknown[]. * fix(react-query): improve type inference for useQueries and useSuspenseQueries results * fix(react-query): fix type of queries in useQueries and useSuspenseQueries * refactor: remove meaningless depths * test(react-query): move type only tests * test(react-query): fix type test error * fix(vue-query): prevent type errors and improve inference for dynamicqueries on useQueries * fix: prevent type errors and improve inference for dynamicqueries * fix: solid type tests not sure why, but compilation must run first with the current tsc version in case solid-query isn't built yet * fix: prevent type errors and improve inference for dynamic queries * chore: remove test * test(react-query): fix failing type tests * fix: fix test syntax error * test(react-query): remove tests for result[0].data * fix: change the result fallback to fix test fail * rollback(angular-query-experimental): restore injectQueries --------- Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Y
Yoomin Kang committed
f63ba16da215241616ab2bb3d6ebed33aeb4ab55
Parent: a4db9ed
Committed by GitHub <noreply@github.com>
on 2/21/2025, 1:14:10 PM