Function _async

  • Tricks the TS compiler into thinking that a model flow generator function can be awaited (is a promise).

    Type Parameters

    • A extends any[]
    • R

    Parameters

    • fn: ((...args: A) => Generator<any, R, any>)

      Flow function.

        • (...args): Generator<any, R, any>
        • Parameters

          • Rest...args: A

          Returns Generator<any, R, any>

    Returns ((...args: A) => Promise<R>)

      • (...args): Promise<R>
      • Parameters

        • Rest...args: A

        Returns Promise<R>

    A Function arguments.

    R Return value.