Open History to see the last commit
1import type { PersistQueryClientOptions as PersistQueryClientOptionsCore } from '@tanstack/query-persist-client-core'
2β
3/**
4 * Configures cache persistence and callbacks for completion of the initial restoration.
5 */
6export type PersistQueryClientUserOptions = {
7 /**
8 * Persistence storage and lifecycle settings; the client is supplied by the Query provider.
9 */
10 persistOptions: Omit<PersistQueryClientOptionsCore, 'queryClient'>
11 /** Called after restoration succeeds. A returned promise is awaited. */
12 onSuccess?: () => unknown
13 /** Called if restoration fails. A returned promise is awaited. */
14 onError?: () => unknown
15}
16β
17/**
18 * Returns persistence options. The function runs once in an Angular injection
19 * context in the browser, so it can call `inject()` and touch browser APIs.
20 */
21export type WithPersistQueryClientFn = () => PersistQueryClientUserOptions