Type alias TaskGeneratorFunction<A, T, TT, R>

TaskGeneratorFunction<A, T, TT, R>: ((...args) => TaskGenerator<T, TT, R>)

Function returning task generator (generator function)

Type Parameters

  • A extends unknown[]

    argument types

  • T

  • TT extends Task<T>

    yielded task type

  • R

    returned task resolve type

Type declaration

Example

const generatorFunction: TaskGeneratorFunction<[], unknown, Task<string>, number> = function*() {
const v = yield* someTaskFunction().generator();

return v.length;
};

Generated using TypeDoc