import type { AnyRecord } from './types/records.js'; export interface UntilContext { callCount: number; lastCall: number | undefined; data: AnyRecord; options: UntilOptions; } export type DelayFn = (context: Readonly) => number; export type Delay = DelayFn | number; export type UntilOptions = { delay: Delay; timeout?: Delay; callLimit?: number; }; export type ResolverValue = T | PromiseLike; export type ResolveFn = (value: ResolverValue) => void; export type RejectFn = (error?: Error) => void; export type UntilCallback = (resolve: ResolveFn, reject: RejectFn, context: Readonly) => void; export declare const isDelay: (input: unknown) => input is Delay; export declare const getDelay: (delay: Delay, context: UntilContext) => number; export declare function until(fn: UntilCallback, options?: UntilOptions): Promise;