interface UntilOptions { check?: (result: T) => boolean | Promise; timeout?: number; delay?: number; message?: string; attempts?: number; } export declare class TimeoutError extends Error { readonly options?: Pick, "timeout" | "delay"> | undefined; constructor(message: string, options?: Pick, "timeout" | "delay"> | undefined); } /** * Retry a function until a certain timeout. * @param {() => (Promise | T)} fn The function to test. * @param {UntilOptions} options The until options, {@see UntilOptions}. * @returns {Promise} */ export default function until(fn: () => T | Promise, options?: UntilOptions): Promise; export {};