UNPKG

@cloudpss/ubrpc

Version:

21 lines 635 B
/** Promise Status */ type PromiseStatus = 'pending' | 'fulfilled' | 'rejected'; /** Ready Promise */ export declare class ReadyPromise { #private; constructor(); /** Resolve the promise */ resolve(): void; /** Reject the promise */ reject(reason: Error): void; /** Settle the promise by provided promise */ settle(p: Promise<void>): void; /** Get the status of the promise */ get status(): PromiseStatus; /** Check if the promise is settled */ get settled(): boolean; /** Get the underlying promise */ get value(): Promise<void>; } export {}; //# sourceMappingURL=ready.d.ts.map