shineout
Version:
Shein 前端组件库
26 lines (25 loc) • 1.09 kB
TypeScript
/**
* from redux.compose https://github.com/reactjs/redux/blob/master/src/compose.js
* Composes single-argument functions from right to left. The rightmost
* function can take multiple arguments as it provides the signature for
* the resulting composite function.
*
* @param {...Function} funcs The functions to compose.
* @returns {Function} A function obtained by composing the argument functions
* from right to left. For example, compose(f, g, h) is identical to doing
* (...args) => f(g(h(...args))).
*/
declare type AnyFunction = (...args: any) => any;
export { compose } from './compose';
export * from './curry';
export declare function curry<U extends AnyFunction>(f: U, ...args: any): any;
export declare function empty(e: {
preventDefault: () => void;
}): void;
export declare function memoize<T extends Function>(fn: T & {
cache?: {
[name: string]: any;
};
}): (key: string) => any;
export declare function createFunc(func?: Function | string): Function;
export declare const throttle: (func: Function, timer?: number | undefined) => Function[];