/** The three possible states of a Task or Job */ export declare enum AsyncState { pending = 0, fulfilled = 1, failed = 2, } /** Resolves to T */ export declare class AsyncTask implements PromiseLike { callbacks: ((task: this) => any)[]; state: AsyncState; reason?: unknown; value?: T; read(): T; fail(reason: any): this; resolve(value: T | PromiseLike): this; flush(): this; then( success?: (value: T) => T1 | PromiseLike, failure?: (reason: unknown) => T2 | PromiseLike ): AsyncTask; static from(value: T | PromiseLike): AsyncTask; } export default AsyncTask;