Describe the bug#
The typing of the isFetchNextPageError property returned by the useSuspenseInfiniteQuery and useInfiniteQuery hooks is incorrect. It is currently typed as false instead of boolean.
Your minimal, reproducible example#
CodeSandbox
Steps to reproduce#
- Use
useSuspenseInfiniteQuery or useInfiniteQuery
- Try to access the
isFetchNextPageError property
- Observe that TypeScript always considers this property to be
false.
Expected behavior#
isFetchNextPageError should be typed as boolean.
How often does this bug happen?#
Every time
Screenshots or Videos#
No response
Platform#
Tanstack Query adapter#
None
TanStack Query version#
5.51.23
TypeScript version#
5.5.2
Additional context#
No response