/** ***************************************** * 加载依赖 ***************************************** */ import { F } from './d'; /** ***************************************** * 配置 ***************************************** */ interface Options { delay?: number; leading?: boolean; trailing?: boolean; } /** ***************************************** * 去抖函数 ***************************************** */ declare type Throttle = (T extends (...args: infer P) => infer Q ? (...args: P) => Q | Promise : never); /** ***************************************** * 函数去抖 ***************************************** */ declare function throttle(handler: T): Throttle; declare function throttle(delay: number, handler: T): Throttle; declare function throttle(delay: number, handler: T, options: Options): Throttle; declare function throttle(handler: T, delay: number): Throttle; declare function throttle(handler: T, delay: number, options: Options): Throttle; declare function throttle(handler: T, options: Options): Throttle; /** ***************************************** * 抛出接口 ***************************************** */ export { throttle }; //# sourceMappingURL=throttle.d.ts.map