Skip to content

pageParam missing from default queryFn typescript definition #6715

Description

@rmanibus

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

https://tanstack.com/

Steps to reproduce

  1. create a default query function in a typescript project
  2. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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