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
feel free to just open a PR with this change next time:
https://github.com/TanStack/query/commit/f052bf2642ca0d3c91fc77ee9dbfac537b2cbf21