Describe the bug#
I'm using v5 of this library and it does not work at all with TypeScript v5, ie:
is not assignable to parameter type UseInfiniteQueryOptions<unknown, DefaultError, InfiniteData<unknown>, unknown, QueryKey, unknown>
is not assignable to parameter type UseMutationOptions<unknown, DefaultError, void, unknown>
Reverting back to TypeScript v4 4.9.5 to be exact works fine again.
Your minimal, reproducible example#
N/A
Steps to reproduce#
Use TypeScript v5 with this library
Expected behavior#
Types should work
How often does this bug happen?#
Every time
Screenshots or Videos#
No response
Platform#
Any platform
Tanstack Query adapter#
None
TanStack Query version#
5.0.0-alpha.71
TypeScript version#
5.1.6
Additional context#
No response
please show a typescript playground reproduction that shows the problem you're having. A simple
useInfiniteQueryworks fine on my side:https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgVwM4FMCSA7AZsbYGdARWXSgE84BfOXKCEOAcgAEYBDbVLgYwDWAeijpOfGAFoAjuSos4QoXBiUw6VAC44nADZgAFpwBQoSLDgAqHajh9o6eo2bsuPfsNkVKk+6IVKKmoa2nqGJsZoWHgERKRylAAUCMZwaXBeVADS6JTaANos6AAenOC66CwAugA0qemZlABi2NrJcGCcAOboAAqcUGW0AJRwALwAfHC9zsAYAHSiqBC6AG7oiUWl5ZVwANQd3X0DZcN16XAAJui4nMi6MP09-YMg2gCM5+k9MAByJY8ji8ym0APq6Ti8J7oGpwUF6XTQ1CwiFQoEnECjSZwVGA54Y-Zwd7GGjDIA
note that the
import * as coreis only necessary to make the typescript playground pull in the query-core types ofalphaas well, it is not necessary in a real app or in a codesandbox environment.