type AnyFunction = (...args: any) => any; /** * @description * 节流装饰器, fn返回值将被忽略 * @param fn * @param timeout default = 0 * @param context 执行上下文 */ declare const throttle: (fn: T, timeout?: number, context?: object) => (...args: Parameters) => void; /** * @description * 异步节流装饰器, 适用于fn需要返回值的时候 * @param fn * @param timeout default = 0 * @param context 执行上下文 */ declare const asyncThrottle: (fn: T, timeout?: number, context?: object) => (...args: Parameters) => Promise>; export { throttle, asyncThrottle };