//#region src/fp/flowAsync.d.ts /** * Creates a reusable async function from a single function. * * @param fn1 - The first function, which may take any number of arguments. * @returns An async function with the same parameters as `fn1` that resolves to its awaited result. */ declare function flowAsync(fn1: (...args: A) => R1): (...args: A) => Promise>; /** * Composes `fn1` and `fn2` left-to-right into a single reusable async function, awaiting each result. * * @param fn1 - The first function, which may take any number of arguments. * @param fn2 - Applied to the awaited result of `fn1`. * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn2`. */ declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2): (...args: A) => Promise>; /** * Composes `fn1` through `fn3` left-to-right into a single reusable async function, awaiting each result. * * @param fn1 - The first function, which may take any number of arguments. * @param fn2 - Applied to the awaited result of `fn1`. * @param fn3 - Applied to the awaited result of `fn2`. * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn3`. */ declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3): (...args: A) => Promise>; /** * Composes `fn1` through `fn4` left-to-right into a single reusable async function, awaiting each result. * * @param fn1 - The first function, which may take any number of arguments. * @param fn2 - Applied to the awaited result of `fn1`. * @param fn3 - Applied to the awaited result of `fn2`. * @param fn4 - Applied to the awaited result of `fn3`. * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn4`. */ declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4): (...args: A) => Promise>; /** * Composes `fn1` through `fn5` left-to-right into a single reusable async function, awaiting each result. * * @param fn1 - The first function, which may take any number of arguments. * @param fn2 - Applied to the awaited result of `fn1`. * @param fn3 - Applied to the awaited result of `fn2`. * @param fn4 - Applied to the awaited result of `fn3`. * @param fn5 - Applied to the awaited result of `fn4`. * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn5`. */ declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5): (...args: A) => Promise>; /** * Composes `fn1` through `fn6` left-to-right into a single reusable async function, awaiting each result. * * @param fn1 - The first function, which may take any number of arguments. * @param fn2 - Applied to the awaited result of `fn1`. * @param fn3 - Applied to the awaited result of `fn2`. * @param fn4 - Applied to the awaited result of `fn3`. * @param fn5 - Applied to the awaited result of `fn4`. * @param fn6 - Applied to the awaited result of `fn5`. * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn6`. */ declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6): (...args: A) => Promise>; /** * Composes `fn1` through `fn7` left-to-right into a single reusable async function, awaiting each result. * * @param fn1 - The first function, which may take any number of arguments. * @param fn2 - Applied to the awaited result of `fn1`. * @param fn3 - Applied to the awaited result of `fn2`. * @param fn4 - Applied to the awaited result of `fn3`. * @param fn5 - Applied to the awaited result of `fn4`. * @param fn6 - Applied to the awaited result of `fn5`. * @param fn7 - Applied to the awaited result of `fn6`. * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn7`. */ declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7): (...args: A) => Promise>; /** * Composes `fn1` through `fn8` left-to-right into a single reusable async function, awaiting each result. * * @param fn1 - The first function, which may take any number of arguments. * @param fn2 - Applied to the awaited result of `fn1`. * @param fn3 - Applied to the awaited result of `fn2`. * @param fn4 - Applied to the awaited result of `fn3`. * @param fn5 - Applied to the awaited result of `fn4`. * @param fn6 - Applied to the awaited result of `fn5`. * @param fn7 - Applied to the awaited result of `fn6`. * @param fn8 - Applied to the awaited result of `fn7`. * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn8`. */ declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8): (...args: A) => Promise>; /** * Composes `fn1` through `fn9` left-to-right into a single reusable async function, awaiting each result. * * @param fn1 - The first function, which may take any number of arguments. * @param fn2 - Applied to the awaited result of `fn1`. * @param fn3 - Applied to the awaited result of `fn2`. * @param fn4 - Applied to the awaited result of `fn3`. * @param fn5 - Applied to the awaited result of `fn4`. * @param fn6 - Applied to the awaited result of `fn5`. * @param fn7 - Applied to the awaited result of `fn6`. * @param fn8 - Applied to the awaited result of `fn7`. * @param fn9 - Applied to the awaited result of `fn8`. * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn9`. */ declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9): (...args: A) => Promise>; /** * Composes `fn1` through `fn10` left-to-right into a single reusable async function, awaiting each result. * * @param fn1 - The first function, which may take any number of arguments. * @param fn2 - Applied to the awaited result of `fn1`. * @param fn3 - Applied to the awaited result of `fn2`. * @param fn4 - Applied to the awaited result of `fn3`. * @param fn5 - Applied to the awaited result of `fn4`. * @param fn6 - Applied to the awaited result of `fn5`. * @param fn7 - Applied to the awaited result of `fn6`. * @param fn8 - Applied to the awaited result of `fn7`. * @param fn9 - Applied to the awaited result of `fn8`. * @param fn10 - Applied to the awaited result of `fn9`. * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn10`. */ declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10): (...args: A) => Promise>; /** * Composes `fn1` through `fn11` left-to-right into a single reusable async function, awaiting each result. * * @param fn1 - The first function, which may take any number of arguments. * @param fn2 - Applied to the awaited result of `fn1`. * @param fn3 - Applied to the awaited result of `fn2`. * @param fn4 - Applied to the awaited result of `fn3`. * @param fn5 - Applied to the awaited result of `fn4`. * @param fn6 - Applied to the awaited result of `fn5`. * @param fn7 - Applied to the awaited result of `fn6`. * @param fn8 - Applied to the awaited result of `fn7`. * @param fn9 - Applied to the awaited result of `fn8`. * @param fn10 - Applied to the awaited result of `fn9`. * @param fn11 - Applied to the awaited result of `fn10`. * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn11`. */ declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10, fn11: (input: Awaited) => R11): (...args: A) => Promise>; /** * Composes `fn1` through `fn12` left-to-right into a single reusable async function, awaiting each result. * * @param fn1 - The first function, which may take any number of arguments. * @param fn2 - Applied to the awaited result of `fn1`. * @param fn3 - Applied to the awaited result of `fn2`. * @param fn4 - Applied to the awaited result of `fn3`. * @param fn5 - Applied to the awaited result of `fn4`. * @param fn6 - Applied to the awaited result of `fn5`. * @param fn7 - Applied to the awaited result of `fn6`. * @param fn8 - Applied to the awaited result of `fn7`. * @param fn9 - Applied to the awaited result of `fn8`. * @param fn10 - Applied to the awaited result of `fn9`. * @param fn11 - Applied to the awaited result of `fn10`. * @param fn12 - Applied to the awaited result of `fn11`. * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn12`. */ declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10, fn11: (input: Awaited) => R11, fn12: (input: Awaited) => R12): (...args: A) => Promise>; /** * Composes `fn1` through `fn13` left-to-right into a single reusable async function, awaiting each result. * * @param fn1 - The first function, which may take any number of arguments. * @param fn2 - Applied to the awaited result of `fn1`. * @param fn3 - Applied to the awaited result of `fn2`. * @param fn4 - Applied to the awaited result of `fn3`. * @param fn5 - Applied to the awaited result of `fn4`. * @param fn6 - Applied to the awaited result of `fn5`. * @param fn7 - Applied to the awaited result of `fn6`. * @param fn8 - Applied to the awaited result of `fn7`. * @param fn9 - Applied to the awaited result of `fn8`. * @param fn10 - Applied to the awaited result of `fn9`. * @param fn11 - Applied to the awaited result of `fn10`. * @param fn12 - Applied to the awaited result of `fn11`. * @param fn13 - Applied to the awaited result of `fn12`. * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn13`. */ declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10, fn11: (input: Awaited) => R11, fn12: (input: Awaited) => R12, fn13: (input: Awaited) => R13): (...args: A) => Promise>; /** * Composes `fn1` through `fn14` left-to-right into a single reusable async function, awaiting each result. * * @param fn1 - The first function, which may take any number of arguments. * @param fn2 - Applied to the awaited result of `fn1`. * @param fn3 - Applied to the awaited result of `fn2`. * @param fn4 - Applied to the awaited result of `fn3`. * @param fn5 - Applied to the awaited result of `fn4`. * @param fn6 - Applied to the awaited result of `fn5`. * @param fn7 - Applied to the awaited result of `fn6`. * @param fn8 - Applied to the awaited result of `fn7`. * @param fn9 - Applied to the awaited result of `fn8`. * @param fn10 - Applied to the awaited result of `fn9`. * @param fn11 - Applied to the awaited result of `fn10`. * @param fn12 - Applied to the awaited result of `fn11`. * @param fn13 - Applied to the awaited result of `fn12`. * @param fn14 - Applied to the awaited result of `fn13`. * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn14`. */ declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10, fn11: (input: Awaited) => R11, fn12: (input: Awaited) => R12, fn13: (input: Awaited) => R13, fn14: (input: Awaited) => R14): (...args: A) => Promise>; /** * Composes `fn1` through `fn15` left-to-right into a single reusable async function, awaiting each result. * * @param fn1 - The first function, which may take any number of arguments. * @param fn2 - Applied to the awaited result of `fn1`. * @param fn3 - Applied to the awaited result of `fn2`. * @param fn4 - Applied to the awaited result of `fn3`. * @param fn5 - Applied to the awaited result of `fn4`. * @param fn6 - Applied to the awaited result of `fn5`. * @param fn7 - Applied to the awaited result of `fn6`. * @param fn8 - Applied to the awaited result of `fn7`. * @param fn9 - Applied to the awaited result of `fn8`. * @param fn10 - Applied to the awaited result of `fn9`. * @param fn11 - Applied to the awaited result of `fn10`. * @param fn12 - Applied to the awaited result of `fn11`. * @param fn13 - Applied to the awaited result of `fn12`. * @param fn14 - Applied to the awaited result of `fn13`. * @param fn15 - Applied to the awaited result of `fn14`. * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn15`. */ declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10, fn11: (input: Awaited) => R11, fn12: (input: Awaited) => R12, fn13: (input: Awaited) => R13, fn14: (input: Awaited) => R14, fn15: (input: Awaited) => R15): (...args: A) => Promise>; //#endregion export { flowAsync };