/** * @file Curry.ts * @author Gage Sorrell * @copyright (c) 2026 Gage Sorrell * @license MIT */ import type { FCurriedArgument, TArgumentVectorWithCurry, TCurriedFunction } from "./Curry.Types.cjs"; export declare const _: FCurriedArgument; /** * Curry a function by fixing some (but not all) of its arguments, by providing a given {@link InFunction}, * and a {@link CurriedArgumentVector} containing the fixed arguments, and {@link _} in place of the * arguments that will remain open. * * @template ArgumentVectorType - The base type of the argument vector of the given {@link InFunction}. * @template ThisReturnType - The base type of the return type of the given {@link InFunction}. * * @param InFunction - The function to curry. * @param CurriedArgumentVector - A vector matching the argument vector of {@link InFunction}, with {@link _} * appearing at least once in place of an argument of proper type to {@link InFunction}. * * @returns {TCurriedFunction, typeof CurriedArgumentVector, ReturnType>} A * function identical to the given {@link InFunction}, but with argument vector consisting of the arguments replaced by {@link _} * in the given {@link CurriedArgumentVector}. * * @example * ```typescript * import { Curry, _ } from "@sorrell/functional"; * * function LongFunction(A: string, B: boolean, C: number): string * { * return `${ A }, ${ B }, ${ C }`; * } * * const ShortFunction = Curry(LongFunction, "Fixed", _, 30); * const Result = ShortFunction(true); * // `Result` <- `"Fixed, true, 30"` * ``` */ export declare function Curry, ThisReturnType>(InFunction: (...ArgumentVector: ArgumentVectorType) => ThisReturnType, ...CurriedArgumentVector: TArgumentVectorWithCurry>): TCurriedFunction, typeof CurriedArgumentVector, ReturnType>; //# sourceMappingURL=Curry.d.cts.map