import type { Resource } from "webappwiz/disposable"; import type { Duration } from "../duration.js"; import type { Timer } from "./timer.js"; interface Entry { callback: () => void; delay: Duration; disposed: boolean; } /** * A {@link Timer} whose callbacks fire only when the test drives them, so tests * about scheduled work do not have to wait for real time to pass. */ export declare class FakeTimer implements Timer { readonly timeouts: Entry[]; readonly intervals: Entry[]; setTimeout(callback: () => void, delay: Duration): Resource; setInterval(callback: () => void, interval: Duration): Resource; fireTimeouts(): void; /** * Fires a single pending timeout by registration order, leaving the rest * pending, for when nested deadlines race and only the outer one should go. */ fireTimeout(index: number): void; fireIntervals(): void; private add; } export {};