-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
pageParam missing from default queryFn typescript definition #6715
Copy link
Copy link
Closed
Labels
Description
Describe the bug
pageParam used to be available in the default queryFn parameter options.
It is still passed (it is working correctly with //@ts-ignore), but typescript is reporting the following error when using it:
Property 'pageParam' does not exist on type '{ queryKey: QueryKey; signal: AbortSignal; meta: Record<string, unknown> | undefined; }'
Your minimal, reproducible example
Steps to reproduce
- create a default query function in a typescript project
- try to add a pageParam parameter
Expected behavior
pageParam is present in the typescript definition
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
all
Tanstack Query adapter
react-query
TanStack Query version
5.17.12
TypeScript version
4.9.5
Additional context
No response
Reactions are currently unavailable