/** * Notices when the page wakes from a suspension it could not observe: a * laptop sleep, a frozen tab, or a network that came back. Live streams on a * page that slept usually died with it, while the hidden-tab signal never * fired (or its grace timer could not run), so they would otherwise wait for * a heartbeat timeout before reconnecting. * * Detection: a light timer compares wall-clock time between ticks (timers do * not run while the machine sleeps, but the wall clock moves on), checked * again when the page becomes visible, plus the `online`, `resume` (Page * Lifecycle) and bfcache `pageshow` events. One shared detector serves every * subscriber and stops with the last one. */ /** How often the wall clock is sampled while anyone listens. */ export declare const PAGE_WAKE_CHECK_INTERVAL_MS = 2000; /** A tick this long after the previous one means the page was suspended. */ export declare const PAGE_WAKE_GAP_MS = 15000; type PageWakeListener = () => void; /** Call `listener` on every detected wake; returns the unsubscribe. */ export declare function subscribePageWake(listener: PageWakeListener): () => void; export {};