Closed as not planned
Closed as not planned
Description
Describe the bug
Writing code like this will produce a compiler error:
useQuery({
queryKey: ['my-query'],
queryFn(ctx) {
return { foo: 1 }
},
refetchInterval(data) {
return 10000
},
select(data) {
return data.foo
},
})
Removing data
from refetchInterval
makes it go away. This seems to be a conflict between the type change in select and the usage of data in callbacks.
Your minimal, reproducible example
Steps to reproduce
Expected behavior
This should work
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Everywhere
Tanstack Query adapter
react-query
TanStack Query version
4.29.4
TypeScript version
4.8.3-5.x
Additional context
No response