Invoke underlying canel method without error
Invoke underlying canel method without error
Wrap task to singleton generator
Userful in order to avoid ambiguous yied types
generator of task wrapping the task
const getString = () => Task.resolved('hello');
const getLength = (data: string) => Task.resolved(data.length);
// ..... //
Task.generate(function* () {
const data = yield getString(); // data: string | number
const length = yield getLength(data); // length: string | number
return length;
});
// ..... //
Task.generate(function* () {
const data = yield* getString().generator(); // data: string
const length = yield* getLength(data).generator(); // length: number
return length;
});
Invoke underlying canel method with error
Invoke underlying canel method with error
error value to be injected from outside
error value to be injected from outside
Return underlying promise in order to await result
underlying promise
Invoke a dedicated transformer according to task resolution and continue execution with it's result
task chaining to a corresponding transformer result
Invoke a dedicated transformer according to task resolution
task resolving to a corresponding transformer result
Invoke a dedicated callback according to task resolution
callback to invoke on cancelation
callback to invoke on cancelation
callback to invoke on failure
callback to invoke on failure
callback to invoke on success
callback to invoke on success
self
Generated using TypeDoc
Task monad interface