import type { Falsy } from "../core/index.js"; export interface PollFn { (abort: AbortSignal): T | Falsy | Promise; } export declare class PollTimeoutError extends Error { } /** * Repeatedly call a function until a truthy value is returned. * * + The function is called at most every event cycle. * + If a timeout occurs, a {@link PollTimeoutError} is thrown and the abort signal passed to the function is aborted with the same error. * * @param fn The function to run. * @param timeout An optional timeout. * @returns The first truthy value. */ export declare function poll(fn: PollFn, timeout?: number): Promise; //# sourceMappingURL=poll.d.ts.map