Uneventful
    Preparing search index...

    Setup<T, This>

    Setup: (this: This, work: Work<T>) => OptionalCleanup

    An Activity function that sets up event listeners, effects, or other ways to do the work of a task, optionally marking the work as completed.

    The function is passed a task's Work context, so it can complete or fail the task, set an .asyncCatch() handler, etc.

    If you don't specify otherwise, the work's default return type is usually never, meaning the task or activity never "finishes" with a result, but simply exits if fails or is canceled (e.g. due to another activity completing the task).

    Type Parameters

    • T

      The type this activity returns

    • This = void

      The type of this the function accepts, if using the deprecated two-argument start() form, or boundTo().

    Type Declaration