/** The part of a window the frames use. */ export interface FrameWindow { requestAnimationFrame(callback: FrameRequestCallback): number; cancelAnimationFrame(id: number): void; setTimeout(callback: () => void, ms: number): number; clearTimeout(id: number | undefined): void; } /** One animation frame a frame, shared: what `frameBatch` gives back. */ export interface FrameBatch { /** Ask for the next frame: every callback asked for before it comes runs in that one frame. Gives an id for `cancel`. */ request(callback: FrameRequestCallback): number; /** Take a callback back: it does not run, even when its frame has begun; the window's frame is cancelled when nothing is left. */ cancel(id: number): void; /** Take everything back and cancel the window's frame: nothing asked for runs. */ clear(): void; /** How many callbacks wait for the next frame. */ readonly waiting: number; } /** * One window frame for everything a view moves: callbacks asked for in the same frame run together in the next. A callback taken back while its frame runs (one before it stopped the view) does not run, and `clear` * leaves nothing that can ask for a frame. */ export declare function frameBatch(win: Pick | null): FrameBatch; /** The measure of the display's interval: what `displayProbe` gives back. */ export interface DisplayProbe { /** Stop it, wherever it is (waiting to begin, or between two frames): it asks for nothing after. */ stop(): void; } /** * Measure the display's own interval once, a moment after a view is mounted: wait `delay` ms, then time `count` idle frames and give the lower decile of their intervals to `done` (a busy moment does not count). A hidden * page starts over when it is shown. `stop` ends it at once. */ export declare function displayProbe(win: FrameWindow, hidden: () => boolean, done: (ms: number) => void, delay?: number, count?: number): DisplayProbe;