import { type Ref } from 'vue'; /** * Two-way state sync across browser tabs. * - Without callback: reactive ref synced across tabs. * - With callback: called when any tab updates this key — side effects. * * @example * // Reactive two-way sync * const cart = useSocketSync('cart', { items: [] }); * cart.value = { items: [1, 2, 3] }; // syncs to all tabs * * @example * // With side effect callback * const cart = useSocketSync('cart', { items: [] }, (cart) => { * document.title = `Cart (${cart.items.length})`; * analytics.track('cart_updated'); * }); */ export declare function useSocketSync(key: string, initialValue: T, callback?: (value: T) => void): Ref;