Describe the bug#
thanks to @jeremiasjutz
The type error is shown when we use useSuspenseQueries with spreaded queryOptions.
function myQueryOptions() {
return queryOptions({
queryKey: ['key1'],
queryFn: () => 'Query Data',
})
}
useSuspenseQueries({
queries: [
{
...myQueryOptions(),
select(data: string) {
return data
},
},
],
})
}
Your minimal, reproducible example#
Steps to reproduce#
Write the code on your text editor.
The type error will be shown.
Expected behavior#
The type error should not be shown.
Also, the type of select function should be inferred.
How often does this bug happen?#
None
Screenshots or Videos#
No response
Platform#
macOS
VS Code
Tanstack Query adapter#
None
TanStack Query version#
5.66.9
TypeScript version#
No response
Additional context#
No response