框架
版本
防抖器 API 参考
节流器 API 参考
速率限制器 API 参考
队列 API 参考
批处理器 API 参考

防抖器状态

接口: DebouncerState<TFn>

定义在: debouncer.ts:6

类型参数

TFn extends AnyFunction

属性

canLeadingExecute

ts
canLeadingExecute: boolean;
canLeadingExecute: boolean;

定义在: debouncer.ts:10

防抖器是否可以在超时前沿执行


executionCount

ts
executionCount: number;
executionCount: number;

定义在: debouncer.ts:14

已完成的函数执行次数


isPending

ts
isPending: boolean;
isPending: boolean;

定义在: debouncer.ts:18

防抖器是否正在等待超时触发执行


lastArgs

ts
lastArgs: undefined | Parameters<TFn>;
lastArgs: undefined | Parameters<TFn>;

定义在: debouncer.ts:22

最近一次调用 maybeExecute 的参数


maybeExecuteCount

ts
maybeExecuteCount: number;
maybeExecuteCount: number;

定义在: debouncer.ts:26

调用 maybeExecute 的次数(用于计算减少)


status

ts
status: "disabled" | "idle" | "pending";
status: "disabled" | "idle" | "pending";

定义在: debouncer.ts:30

当前执行状态 - 'idle' 表示空闲,'pending' 表示等待超时

我们的合作伙伴
Code Rabbit
Unkey
订阅 Bytes

您的每周 JavaScript 资讯。每周一免费发送给超过 10 万开发者。

Bytes

无垃圾邮件。您可以随时取消订阅。

订阅 Bytes

您的每周 JavaScript 资讯。每周一免费发送给超过 10 万开发者。

Bytes

无垃圾邮件。您可以随时取消订阅。