-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
has workaroundhelp wantedExtra attention is neededExtra attention is neededknown limitationpackage: react-querytypes
Description
Describe the bug
When using useQuery, TS correctly infers the argument type of the select query option to be the return type of the queryFn data.
Applying the same settings to useQueries it loses that link and changes it to any.
The linked TS sandbox shows the issue better than I can explain it though.
Your minimal, reproducible example
Steps to reproduce
See linked Typescript playground to a minimal reproducible example
Expected behavior
I would like the type checking of select on useQueries to work as well as it does on useQuery.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- Ubuntu 22.04
Tanstack Query adapter
react-query
TanStack Query version
v5.3.2
TypeScript version
v5.14.0
Additional context
No response
Metadata
Metadata
Assignees
Labels
has workaroundhelp wantedExtra attention is neededExtra attention is neededknown limitationpackage: react-querytypes