import type { ISyncDriver, TResourceOptions } from "../../../query/types/index.js"; import type { Resource } from "../resource/Resource.js"; export interface ISyncerConfig { syncDriver: ISyncDriver; keyPrefix: string | null; defaultSync: "none" | "resources" | "all"; resourcesByKey: Map>; } /** * Encapsulates cross-tab sync (REQ/RES) logic previously inlined in createApi. */ export declare class Syncer { private static readonly SYNC_TIMEOUT_MS; private readonly pendingRequests; private readonly syncDriver; private readonly keyPrefix; private readonly defaultSync; private readonly resourcesByKey; constructor(config: ISyncerConfig); /** Connect the sync driver and start listening for messages. */ connect(): void; /** Create a beforeQuery hook for resource config. */ get beforeQuery(): (resourceKey: string, entryKey: string) => Promise<{ data: unknown; } | null>; /** Check whether sync is enabled for a given resource options. */ isResourceSyncEnabled(opts: TResourceOptions): boolean; /** Clear pending requests and reconnect the sync driver (used by resetAll). */ cleanup(): void; private handleIncomingSyncMessage; private requestDataFromOtherTabs; }