/** The deadline passed without `fn` producing a result. Distinct from `fn` itself * failing, so callers can tell "nobody clicked the link" from "the backend errored". */ export declare class PollTimeoutError extends Error { constructor(message?: string); } export interface PollOptions { intervalMs?: number; timeoutMs?: number; /** * How many CONSECUTIVE `fn` throws to tolerate before giving up by rethrowing the * last one. Defaults to 0 — the historical behavior where the first throw aborts — * so existing call sites (subscribe) are unchanged; opt in where a long poll must * survive transient 429/5xx blips (e.g. a magic-link sign-in wait). */ maxConsecutiveErrors?: number; /** Errors tolerance must NOT apply to (dead session, suspended account) — rethrown immediately. */ isFatal?: (err: unknown) => boolean; /** Called on each tolerated error, e.g. to log a retry line. */ onTransientError?: (err: unknown, consecutive: number) => void; } export declare function poll(fn: () => Promise, opts?: PollOptions): Promise; //# sourceMappingURL=poll.d.ts.map