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.

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

    A Function arguments.

    R Return value.