Skip to content
Source
Sign inSign up
TanStack/query

Docs (persistQueryClient.md) describe incorrect `PersistedClient` interface definition #9313

Send to my agent
ClosedWiktor102(GitHub profile, opens in a new tab) opened this issue 1 comment

Describe the bug

The docs describe the PersistedClient interface as

export interface PersistedClient {
  timestamp: number
  buster: string
  cacheState: any
}

That interface is incorrect as of the newest versions.

Your minimal, reproducible example

https://tanstack.com/query/latest/docs/framework/react/plugins/persistQueryClient#persisters

Steps to reproduce

https://tanstack.com/query/latest/docs/framework/react/plugins/persistQueryClient#persisters

Expected behavior

The interface defined here is different: https://github.com/TanStack/query/blob/b180d83616c361deadd3ebc5461223d8f96721ca/packages/query-persist-client-core/src/persist.ts#L18-L22 Notice the absence of cacheState. Instead, there is clientState. The docs should be updated to reflect the real interface used.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Chrome

Tanstack Query adapter

None

TanStack Query version

v5.80.6

TypeScript version

No response

Additional context

No response

  1. TkDodocommented

    feel free to just open a PR with this change next time:

    https://github.com/TanStack/query/commit/f052bf2642ca0d3c91fc77ee9dbfac537b2cbf21

  2. TkDodo closed this

  3. TkDodo added labelsdocumentation

Sign in to join this conversation.