UNPKG

type-plus

Version:
12 lines 640 B
import type { Head } from '../array/head.js'; import type { Last } from '../array/last.js'; import type { AnyFunction } from '../function/any_function.js'; /** * Compose functions to produce a new function. * @params args functions to be composed. * Each function will receive the return value of the previous function as its parameters. * @return The composed function will expect the parameters of the first function, * and return the result of the last function. */ export declare function compose<FS extends AnyFunction[]>(...fns: FS): (...args: Parameters<Head<FS>>) => ReturnType<Last<FS>>; //# sourceMappingURL=compose.d.ts.map