Skip to content
Source
Sign inSign up
TanStack/query

Infinite queries type issue for `isFetchNextPageError` #7954

Send to my agent
Closedantoadam(GitHub profile, opens in a new tab) opened this issue 0 comments

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

  1. Use useSuspenseInfiniteQuery or useInfiniteQuery
  2. Try to access the isFetchNextPageError property
  3. 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

  • OS: macOS (14.6.1)

Tanstack Query adapter

None

TanStack Query version

5.51.23

TypeScript version

5.5.2

Additional context

No response

  1. TkDodo added labelsbug

  2. TkDodo added labelstypes

  3. TkDodo closed this

Sign in to join this conversation.