async-injection
Version:
A robust lightweight dependency injection library for TypeScript.
16 lines (15 loc) • 533 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> | null, rejected?: unknown, fulfilled?: TState): State<TState>;
protected constructor();
protected _promise: Promise<T> | null;
get promise(): Promise<T> | null;
protected _pending: boolean;
get pending(): boolean;
protected _fulfilled: T;
get fulfilled(): T;
protected _rejected: unknown;
get rejected(): unknown;
}