async-injection
Version:
A robust lightweight dependency injection library for TypeScript.
16 lines (15 loc) • 512 B
TypeScript
/**
* Internal class that allows us to track the state of a promise (chain).
*/
export declare class State<T = any> {
static MakeState<TState = any>(promise: Promise<TState>, rejected?: unknown, fulfilled?: TState): State<TState>;
protected constructor();
protected _promise: Promise<T>;
get promise(): Promise<T>;
protected _pending: boolean;
get pending(): boolean;
protected _fulfilled: T;
get fulfilled(): T;
protected _rejected: unknown;
get rejected(): unknown;
}