/** * Frame-aligned batching for Virtual DOM patches. * * A real-time feed delivers updates on its own schedule — a WebSocket can push * hundreds of messages between two paints. Writing to the DOM on each of them * would interleave reads and writes and thrash layout for frames the user never * sees. The scheduler collapses every update that arrives within one frame into * a single flush, so the DOM is touched at most once per frame no matter how * fast the source runs. * * @packageDocumentation */ /** * Coalesces per-row patch requests into one animation-frame flush. * * The pending set is reused across flushes rather than reallocated, keeping GC * pressure flat under sustained high-frequency updates. */ export declare class PatchScheduler { private readonly flush; private readonly pending; private handle; /** Set when a caller requested a full-viewport diff rather than named rows. */ private pendingAll; /** * @param flush - Applies the patch for the given rows (`null` = every * rendered row). Invoked at most once per animation frame. */ constructor(flush: (nodeIds: Iterable | null) => void); /** * Queues rows for patching on the next frame. * * @param nodeIds - Rows to diff, or `null` to diff the whole viewport. A * `null` request supersedes any queued row ids for that * frame, since a full diff already covers them. */ schedule(nodeIds: Iterable | null): void; /** * Applies any queued work immediately instead of waiting for the frame. * * Used when the grid must be consistent synchronously — before measuring, * exporting, or running an assertion in a test. */ flushNow(): void; /** Discards queued work without applying it. */ cancel(): void; /** `true` when a flush is queued for the next frame. */ get isPending(): boolean; private readonly run; } //# sourceMappingURL=patch-scheduler.d.ts.map