Type alias Task<R, P>

Task<R, P>: ((...args: P) => Promise<R>) | ((...args: P) => R) | R | Promise<R>

A Task is something that ultimately resolves to a value.

In general usage, a Task will be a function that returns a value, or a Promise that resolves to a value. The intent of this module is that some Tasks in your plan are ones that you don't want to run unless you have to.

They can also just be plain values; these are most useful as a final step in a plan where you want to have a guaranteed value (and not an error path)

Type Parameters

  • R = void

    The return type of your Task

  • P extends unknown[] = []

    A tuple that represents the parameter types of your Task. This can be left off for Tasks that take no parameters

Generated using TypeDoc