定义于:debouncer.ts:7
用于配置防抖函数的选项
• TFn extends AnyFunction
optional enabled: boolean | (debouncer) => boolean;
optional enabled: boolean | (debouncer) => boolean;
定义于:debouncer.ts:13
防抖器是否启用。禁用时,maybeExecute 不会触发任何执行。 可以是布尔值或返回布尔值的函数。 默认为 true。
optional leading: boolean;
optional leading: boolean;
定义于:debouncer.ts:19
是否在超时的前沿执行。 第一次调用将立即执行,其余调用将等待延迟。 默认为 false。
optional onExecute: (debouncer) => void;
optional onExecute: (debouncer) => void;
定义于:debouncer.ts:23
函数执行后调用的回调函数
Debouncer<TFn>
void
optional trailing: boolean;
optional trailing: boolean;
定义于:debouncer.ts:28
是否在超时的后沿执行。 默认为 true。
wait: number | (debouncer) => number;
wait: number | (debouncer) => number;
定义于:debouncer.ts:34
执行函数前的延迟时间(以毫秒为单位)。 可以是数字或返回数字的函数。 默认为 0 毫秒