/** * The clock behind the voice status line's rotating phrase, as plain functions. * * ★★ Why this is not simply a hook. fe-libs tests run with no DOM and no React * renderer, and static rendering runs no effects. A clock written inline in a * component is exercised by nothing, so every way of breaking it — never * starting, never resetting, never clearing — passes the whole suite (measured: * seven such mutations survived before this split). Here the state rules are * pure and the ticker runs under fake timers; the hook that joins them is a few * lines, pinned by `voiceStatusWiring.test.ts`. */ export interface RotationClock { /** Whole rotation steps since the clock last became active. */ readonly steps: number; readonly active: boolean; } export declare const IDLE_ROTATION_CLOCK: RotationClock; /** * Follow `active`, restarting from step 0 whenever it changes. * * ★ Returns the SAME object when nothing changed. The hook adjusts state during * render only on a change of identity, so a fresh object here every call would * be an infinite render loop. */ export declare function syncRotationClock(clock: RotationClock, active: boolean): RotationClock; /** One tick. A tick that lands after the clock went inactive is ignored. */ export declare function advanceRotationClock(clock: RotationClock): RotationClock; export declare function rotationElapsedMs(clock: RotationClock): number; /** Call `onTick` every `intervalMs` until the returned stop function runs. */ export declare function startRotationTicker(onTick: () => void, intervalMs?: number): () => void; //# sourceMappingURL=rotationClock.d.ts.map