type Function = (...args: unknown[]) => TReturn; /** * Composes multiple functions into a single function. * * The functions are composed from right to left, meaning that the first function in the list will be the last to be called. * * For example: * compose(f, g, h)(x) is equivalent to f(g(h(x))) * * @param functions The functions to compose * @returns A single function that is the composition of all the provided functions * * @example * ```typescript * const addOne = (x: number) => x + 1; * const multiplyByTwo = (x: number) => x * 2; * const addOneAndMultiplyByTwo = compose(multiplyByTwo, addOne); * const result = addOneAndMultiplyByTwo(3); // 8 * ``` */ export declare function compose(...functions: Function[]): Function; export {};