completable-promise
Version:
CompletablePromise library allows to create a Promise instance that does not start its resolution upon its declaration.
18 lines (17 loc) • 414 B
TypeScript
/**
* Represents the states of a promise.
*/
export declare enum State {
/**
* Promise initial state.
*/
Pending = "pending",
/**
* Promise state after the method {@link CompletablePromise.resolve} has been called.
*/
Fulfilled = "fulfilled",
/**
* Promise state after the method {@link CompletablePromise.reject} has been called.
*/
Rejected = "rejected"
}