/** A strategy that ensures jobs taking more than a specified timeout settle as "rejected". */ import type { Job, NevermoreOptions, Pipe, Strategy, TimeoutOptions } from "../types"; export declare class TimeoutError extends Error { constructor(timeoutMs: number); } export declare function isTimeoutOptions(options: NevermoreOptions): options is TimeoutOptions; type TimeoutJob> = J extends Job ? Job & { jobToTimeout: J; timeoutMs: number; } : never; export declare function createTimeoutStrategy>(options: TimeoutOptions, downstream: Strategy>): { launchesDone: () => void; launchJob(job: J): Promise; next(): Promise | { done: false; value: { value: Awaited>; job: J; status: "fulfilled"; }; } | { done: false; value: { job: J; status: "rejected"; reason: unknown; }; }>; }; export declare function createTimeoutPipe(options: TimeoutOptions): Pipe; export {}; //# sourceMappingURL=timeout.d.ts.map