Skip to content

Infinite queries type issue for isFetchNextPageError #7954

Closed
@antoadam

Description

@antoadam

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtypes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions