diff --git a/types/flow.d.ts b/types/flow.d.ts new file mode 100644 index 0000000..4867ba4 --- /dev/null +++ b/types/flow.d.ts @@ -0,0 +1,11 @@ +export function flow(seed: S, pipeline: [(a: S) => R1]): R1; +export function flow(seed: S, pipeline: [(a: S) => R1, (a: R1) => R2]): R2; +export function flow(seed: S, pipeline: [(a: S) => R1, (a: R1) => R2, (a: R2) => R3]): R3; +export function flow(seed: S, pipeline: [(a: S) => R1, (a: R1) => R2, (a: R2) => R3, (a: R3) => R4]): R4; +export function flow(seed: S, pipeline: [(a: S) => R1, (a: R1) => R2, (a: R2) => R3, (a: R3) => R4, (a: R4) => R5]): R5; +export function flow(seed: S, pipeline: [(a: S) => R1, (a: R1) => R2, (a: R2) => R3, (a: R3) => R4, (a: R4) => R5, (a: R5) => R6]): R6; +export function flow(seed: S, pipeline: [(a: S) => R1, (a: R1) => R2, (a: R2) => R3, (a: R3) => R4, (a: R4) => R5, (a: R5) => R6, (a: R6) => R7]): R7; +export function flow(seed: S, pipeline: [(a: S) => R1, (a: R1) => R2, (a: R2) => R3, (a: R3) => R4, (a: R4) => R5, (a: R5) => R6, (a: R6) => R7, (a: R7) => R8]): R8; +export function flow(seed: S, pipeline: [(a: S) => R1, (a: R1) => R2, (a: R2) => R3, (a: R3) => R4, (a: R4) => R5, (a: R5) => R6, (a: R6) => R7, (a: R7) => R8, (a: R8) => R9]): R9; +// catch all +export function flow(seed: S, pipeline: [(a: S) => any, ...((a: any) => any)]): R;