import { SavedPromise } from "./saved-promise"; /** * Maintains an array of SavedPromise types that can call accept or reject * on all of them. */ export declare class SavedPromiseArray { private readonly _queue; constructor(); push(promise: SavedPromise | undefined | null): void; add(accept: (value: T) => void, reject: (reason?: any) => void): void; /** * Flush the internal queue and call accept() on all saved promises * * @param value - the value to pass into the accept method */ accept(value: T): void; /** * Flush the internal queue and call accept() on all saved promises. If accept() * throws an error then reject() will be called with the error. * * @param value - the value to pass into the accept method */ acceptOrReject(value: T): void; /** * Flush the internal queue and call reject() on all saved promises * * @param reason - the value to pass into the reject method */ reject(reason?: any): void; /** * The number of saved promises in the queue */ get length(): number; }