/** * Types of global (shared) query clients available. * - 'app': Client persists for the entire browser session (until refresh/close) * - 'page': Client uses reference counting. Disposes when the last page client instance is disposed (e.g., when all components using getQueryClient('page') unmount) */ type GlobalClientType = 'app' | 'page'; /** * Configuration for using a globally shared query client. * Can be specified as a simple string ('app' or 'page') or as an object with additional options. * * @template T - The default value type for the query * * @example * ```typescript * // Simple string syntax * queryOptions(): QueryApiOptions { * return { * queryKey: ['myapp', 'users'], * queryFn: async () => api.getUsers(), * globalClient: 'page', * }; * } * ``` * * @example * ```typescript * // Object syntax with dispose option * queryOptions(): QueryApiOptions { * return { * queryKey: ['myapp', 'users'], * queryFn: async () => api.getUsers(), * globalClient: { * type: 'page', * dispose: true, * }, * }; * } * ``` */ export type GlobalClientOptions = GlobalClientType | { type: GlobalClientType; dispose?: boolean; defaultValue?: T; }; export declare function getTypeName(type: GlobalClientType): string; export declare function getClientType(options?: GlobalClientOptions): GlobalClientType | ""; export declare function isSharedClient(options?: GlobalClientOptions): boolean; /** True when `globalClient` is set and the injected client does not isolate from `window.queryClients`. */ export declare function shouldShareWindowClient(globalClient?: GlobalClientOptions, client?: { isolateFromWindowClients?: boolean; }): boolean; export declare function getClientOptions(options?: GlobalClientOptions): { type: GlobalClientType; dispose?: boolean; defaultValue?: any; } | undefined; export declare function isArrayofArrays(arr: any): arr is any[][]; export {}; //# sourceMappingURL=client-helpers.d.ts.map