Function: _async()
function _async<A, R>(fn): (...args) => Promise<R>;
Tricks the TS compiler into thinking that a model flow generator function can be awaited (is a promise).
Type Parameters
| Type Parameter | Description |
|---|---|
A extends any[] | Function arguments. |
R | Return value. |
Parameters
| Parameter | Type | Description |
|---|---|---|
fn | (...args) => Generator<any, R, any> | Flow function. |
Returns
(...args) => Promise<R>