/**
 * Coordinated update scheduler for WS-driven state.
 *
 * Updaters registered with the same `throttleMs` share one timer and fire
 * together. Pick the same `throttleMs` to coordinate cross-stream rendering;
 * pick different values for independent cadences.
 *
 * Browser callers pass `schedule: (cb) => requestAnimationFrame(() => cb())`
 * to align drains with paint and skip hidden tabs. Node callers omit it for
 * synchronous drain.
 */
export interface UpdateSchedulerOptions {
    /** Wraps the drain — typically `requestAnimationFrame` in browsers. */
    schedule?: (cb: () => void) => void;
    /** Defaults to `console.error('[ws-update-scheduler]', e)`. A throw in one
     *  updater never stops the others. */
    onError?: (error: unknown) => void;
}
export interface UpdateScheduler {
    /** Returns an unregister fn. Same fn registered twice yields two entries. */
    register(updater: () => void, throttleMs: number): () => void;
    /** Drain every group right now. Re-entrant calls are suppressed. */
    updateNow(): void;
    /** After this, register() throws. */
    destroy(): void;
}
export declare function createUpdateScheduler(opts?: UpdateSchedulerOptions): UpdateScheduler;
//# sourceMappingURL=wsUpdateScheduler.d.ts.map