@kephas/core
Version:
Provides a common infrastructure for all the other Kephas Framework components: ambient services, dynamic reflection, composition, application management, and others.
36 lines (35 loc) • 827 B
TypeScript
/**
* A deferrable value.
*
* @export
* @class Deferrable
* @template T
*/
export declare class Deferrable<T> {
/**
* Gets the promise of this deferrable.
*
* @type {Promise<T>}
* @memberof Deferrable
*/
readonly promise: Promise<T>;
/**
* Creates an instance of Deferrable.
* @memberof Deferrable
*/
constructor();
/**
* Resolves the promise to the indicated value.
*
* @param {(T | PromiseLike<T>)} [value] The resolved value.
* @memberof Deferrable
*/
resolve: (value: T | PromiseLike<T>) => void;
/**
* Rejects the promise with the indicated reason.
*
* @param {*} [reason] The reason for rejection.
* @memberof Deferrable
*/
reject: (reason?: any) => void;
}