export function flow(fnAb: (a: A) => B | Promise): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (b: B) => C | Promise] ): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (c: C) => D | Promise] ): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (d: D) => E | Promise] ): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (e: E) => F | Promise] ): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (f: F) => G | Promise] ): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (g: G) => H | Promise] ): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (h: H) => I | Promise] ): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (i: I) => J | Promise] ): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (j: J) => K | Promise] ): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (k: K) => L | Promise] ): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (l: L) => M | Promise] ): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (m: M) => N | Promise] ): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (n: N) => O | Promise] ): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (o: O) => P | Promise

] ): (a: A) => Promise

; export function flow( ...fns: [...Parameters>, (p: P) => Q | Promise] ): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (q: Q) => R | Promise] ): (a: A) => Promise; export function flow( ...fns: [...Parameters>, (r: R) => S | Promise] ): (a: A) => Promise; export function flow( ...fns: [ ...Parameters>, (s: S) => T | Promise, ] ): (a: A) => Promise; export function flow( ...fns: [ ...Parameters>, (t: T) => U | Promise, ] ): (a: A) => Promise; export function flow( ...fns: [ ...Parameters>, (u: U) => V | Promise, ] ): (a: A) => Promise; export function flow( ...fns: [ ...Parameters>, (v: V) => W | Promise, ] ): (a: A) => Promise; export function flow( ...fns: [ ...Parameters>, (w: W) => X | Promise, ] ): (a: A) => Promise; export function flow( ...fns: [ ...Parameters>, (x: X) => Y | Promise, ] ): (a: A) => Promise; export function flow( ...fns: [ ...Parameters>, (y: Y) => Z | Promise, ] ): (a: A) => Promise; export function flow(...fns: ((v: unknown) => unknown | Promise)[]): (v: unknown) => Promise { return async (a) => _pipe(a, ...fns); } export function pipe(value: A, fnAb: (a: A) => B | Promise): Promise; export function pipe(...args: [...Parameters>, (b: B) => C | Promise]): Promise; export function pipe(...args: [...Parameters>, (c: C) => D | Promise]): Promise; export function pipe( ...args: [...Parameters>, (d: D) => E | Promise] ): Promise; export function pipe( ...args: [...Parameters>, (e: E) => F | Promise] ): Promise; export function pipe( ...args: [...Parameters>, (f: F) => G | Promise] ): Promise; export function pipe( ...args: [...Parameters>, (g: G) => H | Promise] ): Promise; export function pipe( ...args: [...Parameters>, (h: H) => I | Promise] ): Promise; export function pipe( ...args: [...Parameters>, (i: I) => J | Promise] ): Promise; export function pipe( ...args: [...Parameters>, (j: J) => K | Promise] ): Promise; export function pipe( ...args: [...Parameters>, (k: K) => L | Promise] ): Promise; export function pipe( ...args: [...Parameters>, (l: L) => M | Promise] ): Promise; export function pipe( ...args: [...Parameters>, (m: M) => N | Promise] ): Promise; export function pipe( ...args: [...Parameters>, (n: N) => O | Promise] ): Promise; export function pipe( ...args: [...Parameters>, (o: O) => P | Promise

] ): Promise

; export function pipe( ...args: [...Parameters>, (p: P) => Q | Promise] ): Promise; export function pipe( ...args: [...Parameters>, (Q: Q) => R | Promise] ): Promise; export function pipe( ...args: [ ...Parameters>, (r: R) => S | Promise, ] ): Promise; export function pipe( ...args: [ ...Parameters>, (s: S) => T | Promise, ] ): Promise; export function pipe( ...args: [ ...Parameters>, (t: T) => U | Promise, ] ): Promise; export function pipe( ...args: [ ...Parameters>, (u: U) => V | Promise, ] ): Promise; export function pipe( ...args: [ ...Parameters>, (v: V) => W | Promise, ] ): Promise; export function pipe( ...args: [ ...Parameters>, (w: W) => X | Promise, ] ): Promise; export function pipe( ...args: [ ...Parameters>, (x: X) => Y | Promise, ] ): Promise; export function pipe( ...args: [ ...Parameters>, (y: Y) => Z | Promise, ] ): Promise; export function pipe(value: unknown, ...fns: ((v: unknown) => unknown | Promise)[]): Promise { return _pipe(value, ...fns); } async function _pipe(value: unknown, ...fns: ((v: unknown) => unknown | Promise)[]): Promise { for (const fn of fns) { value = await fn(value); } return value; }