declare type CancelOperation = () => void; declare type Operation = (fulfill: (t: T) => void, reject: (e: E) => void) => CancelOperation | void; /** * A Task is a container for an operation. * * The result of the operation can be accessed using operators such as map. The * Task can be executed using the run method. */ export declare class Task { _operation: Operation; static of(t: T): Task; static reject(e: E): Task; static fromPromise(callback: () => Promise): Task; constructor(operation: Operation); run(onFulfilled?: (t: T) => void, onRejected?: (e: E) => void): () => void; map(func: (t: T) => U): Task; mapRejected(func: (e: E) => F): Task; chain(func: (t: T) => Task): Task; chainRejected(func: (e: E) => Task): Task; } export {}; //# sourceMappingURL=Task.d.ts.map