Uneventful
    Preparing search index...

    EventuallyReturns<T, This>

    EventuallyReturns: (this: This, work: Work<T>) => Eventual<T>

    An Activity function that returns an Eventual value (such as a Coroutine or a promise/promiselike object).

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

    If you use a generator function for this, and are using the work or self parameter, TypeScript isn't always able to guess what type that parameter should have, and may guess incorrectly. In such cases it usually suffices to supply the type explicitly somewhere, via e.g. start<number>(function*(work) {...}) or starting<string>(function*(self){...}).

    Note, too, that generator functions do not start executing until a microtask after the one where they are started or exec()'d. See Coroutine for more detail.

    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