import { Query, QueryClient } from '@tanstack/react-query';

interface SyncStorageLike {
    getItem(key: string): string | null;
    setItem(key: string, value: string): void;
    removeItem(key: string): void;
    key?(index: number): string | null;
    length?: number;
}
interface PersistOptions {
    userId: string | null;
    buster: string;
    storage?: SyncStorageLike | null | undefined;
    keyPrefix?: string;
    maxAgeMs?: number;
    maxBytes?: number;
    throttleMs?: number;
    shouldDehydrateQuery?: (query: Query) => boolean;
}
declare function persistKeyForUser(userId: string | null): string;
declare function installPersistence(queryClient: QueryClient, options: PersistOptions): () => void;
declare function clearPersistedCache(options?: {
    keyPrefix?: string;
    allUsers?: boolean;
    storage?: SyncStorageLike | null | undefined;
}): void;

export { type PersistOptions, type SyncStorageLike, clearPersistedCache, installPersistence, persistKeyForUser };
