export interface Biddable { promise: Promise; fulfil: (...args: Args) => void; fail: (error: unknown) => void; } /** Reference implementation to give access to a Promise callback outside the * scope of a Promise constructor function. By default, FulfilmentArgs is a zero-length * array, meaning `callback` is `() => void` and `promise` is Promise<[]> - an * awaitable flag having no value. */ export declare function createBiddablePromise(): { promise: Promise; fulfil: (...args: Args) => void; fail: (reason?: unknown) => void; }; /** Construct for an awaitable `notify()` callback, with `notified` indicating whether it has been called. */ export declare function createFlag(): { promise: Promise<[]>; flagged: boolean; flag: () => void; }; /** A loop that consumes an async iterator's values strictly in * sequence as fast as they can be yielded and resolved. Resolved values are ignored. * Rejected values will cause `pull` to throw the error. If a provided cancelPromise * is resolved, this will cancel the loop. */ export declare function pull(iterator: AsyncIterator, cancelPromise?: Promise | null): Promise; export declare function asyncIterable(iterator: AsyncIterator): AsyncIterable; export declare function serializeError(err: unknown): string; export declare function sleep(delayMs: number): Promise; //# sourceMappingURL=util.d.ts.map