import { PersistRetryer, PersistedClient, Persister } from "@tanstack/query-persist-client-core"; //#region src/index.d.ts interface Storage { getItem: (key: string) => string | null; setItem: (key: string, value: string) => void; removeItem: (key: string) => void; } interface CreateSyncStoragePersisterOptions { /** * The storage client used for setting and retrieving items from cache. * For SSR pass in `undefined`. Note that window.localStorage can be * `null` in Android WebViews depending on how they are configured. */ storage: Storage | undefined | null; /** The key to use when storing the cache */ key?: string; /** * To avoid spamming, * pass a time in ms to throttle saving the cache to disk */ throttleTime?: number; /** * How to serialize the data to storage. * @default `JSON.stringify` */ serialize?: (client: PersistedClient) => string; /** * How to deserialize the data from storage. * @default `JSON.parse` */ deserialize?: (cachedString: string) => PersistedClient; retry?: PersistRetryer; } /** * Creates a persister that stores the client in a synchronous storage such as * `window.localStorage`. * @param options - The `storage` to persist to, the `key`, `throttleTime`, `serialize`, * `deserialize`, and `retry` options. * @returns A persister that saves, restores, and removes the client in `storage`. Without * `storage`, its methods do nothing. * @deprecated use `createAsyncStoragePersister` from `@tanstack/query-async-storage-persister` instead. */ export declare function createSyncStoragePersister({ storage, key, throttleTime, serialize, deserialize, retry }: CreateSyncStoragePersisterOptions): Persister; //#endregion //# sourceMappingURL=index.d.cts.map