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

批处理器状态

接口: BatcherState<TValue>

定义于: batcher.ts:6

类型参数

TValue

属性

executionCount

ts
executionCount: number;
executionCount: number;

定义于: batcher.ts:10

已完成的批次执行次数


isEmpty

ts
isEmpty: boolean;
isEmpty: boolean;

定义于: batcher.ts:14

批次处理器是否没有要处理的项目 (items 数组为空)


isPending

ts
isPending: boolean;
isPending: boolean;

定义于: batcher.ts:18

批次处理器是否正在等待超时触发批次处理


items

ts
items: TValue[];
items: TValue[];

定义于: batcher.ts:22

当前排队等待批次处理的项目数组


size

ts
size: number;
size: number;

定义于: batcher.ts:26

当前批次队列中的项目数量


status

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

定义于: batcher.ts:30

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


totalItemsProcessed

ts
totalItemsProcessed: number;
totalItemsProcessed: number;

定义于: batcher.ts:34

所有批次中已处理的总项目数

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

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

Bytes

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

订阅 Bytes

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

Bytes

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