Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite queries type issue for isFetchNextPageError #7954

Closed
ohanqo opened this issue Aug 26, 2024 · 1 comment · Fixed by #7956
Closed

Infinite queries type issue for isFetchNextPageError #7954

ohanqo opened this issue Aug 26, 2024 · 1 comment · Fixed by #7956
Labels
bug Something isn't working types

Comments

@ohanqo
Copy link

ohanqo commented Aug 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working types
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@TkDodo @ohanqo and others