/** * When buffered realtime work runs. * * `'frame'` coalesces a burst of events into one cache write per animation * frame. `'sync'` restores the older behaviour of writing as each event * arrives. A number debounces by that many milliseconds. */ export type NotifyScheduler = 'sync' | 'frame' | number; /** The timer functions the scheduler needs, injectable so tests control time. */ export type RealtimeClock = { setTimeout: (fn: () => void, ms: number) => unknown; clearTimeout: (handle: unknown) => void; }; export type FlushScheduler = { /** * Ask for `flush` to run. Calls made while a flush is already pending are * absorbed into it, so the flush runs once per window however many events * arrived. */ schedule: (flush: () => void) => void; /** Drop a pending flush without running it. */ cancel: () => void; }; export declare const systemClock: RealtimeClock; export declare function createFlushScheduler(mode: NotifyScheduler, clock?: RealtimeClock): FlushScheduler; //# sourceMappingURL=realtime-flush.d.ts.map