diff --git a/src/api/flow.ts b/src/api/flow.ts index 81759a823..c477bacf5 100644 --- a/src/api/flow.ts +++ b/src/api/flow.ts @@ -37,8 +37,8 @@ export function flow( ): (a1: A1, a2: A2, a3: A3) => CancellablePromise export function flow( generator: (a1: A1, a2: A2) => IterableIterator -): (a1: A1, a2: A2) => Promise -export function flow(generator: (a1: A1) => IterableIterator): (a1: A1) => Promise +): (a1: A1, a2: A2) => CancellablePromise +export function flow(generator: (a1: A1) => IterableIterator): (a1: A1) => CancellablePromise export function flow(generator: Function) { if (arguments.length !== 1) fail(process.env.NODE_ENV && `Flow expects one 1 argument and cannot be used as decorator`)