import type { OnyxKey } from '../../types'; import type { StorageKeyList, OnStorageKeysChanged } from '../providers/types'; import type StorageProvider from '../providers/types'; /** * Raise cross-tab event(s) for a batch of changed keys. Sending keys together (instead of one event per * key) preserves the write's batch boundary across tabs, so the receiving tab notifies collection * subscribers once for the whole batch — matching the local mergeCollection behavior — instead of * re-delivering the whole collection once per member (O(N^2), which can crash the tab). Large batches are * chunked so no single payload approaches the localStorage quota. */ declare function raiseStorageSyncManyKeysEvent(onyxKeys: StorageKeyList): void; /** * Raise an event through `localStorage` to let other tabs know a single key changed. * * This intentionally emits the raw key (the legacy, pre-batching format) rather than a JSON array, so a * tab still running the previous bundle during a deploy keeps receiving single-key updates (a new message, * a pin, a rename, etc.). Only multi-key writes use the batched JSON-array format; the receiver here * understands both. The mixed-version gap is therefore limited to bulk collection writes, which resolve on reload. */ declare function raiseStorageSyncEvent(onyxKey: OnyxKey): void; declare const InstanceSync: { shouldBeUsed: boolean; /** * @param {Function} onStorageKeysChanged Storage synchronization mechanism keeping all opened tabs in sync */ init: (onStorageKeysChanged: OnStorageKeysChanged, store: StorageProvider) => void; setItem: typeof raiseStorageSyncEvent; removeItem: typeof raiseStorageSyncEvent; removeItems: typeof raiseStorageSyncManyKeysEvent; multiMerge: typeof raiseStorageSyncManyKeysEvent; multiSet: typeof raiseStorageSyncManyKeysEvent; mergeItem: typeof raiseStorageSyncEvent; clear: (clearImplementation: () => void) => Promise; }; export default InstanceSync;