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

异步批处理器状态

接口:AsyncBatcherState<TValue>

定义于:async-batcher.ts:6

类型参数

TValue

属性

errorCount

ts
errorCount: number;
errorCount: number;

定义于:async-batcher.ts:10

导致错误的批处理执行次数


失败项

ts
failedItems: TValue[];
failedItems: TValue[];

定义于:async-batcher.ts:14

批处理过程中失败的项数组


isEmpty

ts
isEmpty: boolean;
isEmpty: boolean;

定义于:async-batcher.ts:18

批处理程序是否没有要处理的项(项数组为空)


isExecuting

ts
isExecuting: boolean;
isExecuting: boolean;

定义于:async-batcher.ts:22

当前是否正在异步处理批处理


isPending

ts
isPending: boolean;
isPending: boolean;

定义于:async-batcher.ts:26

批处理程序是否正在等待超时触发批处理


items

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

定义于:async-batcher.ts:30

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


lastResult

ts
lastResult: any;
lastResult: any;

定义于:async-batcher.ts:34

最近一次批处理执行的结果


settleCount

ts
settleCount: number;
settleCount: number;

定义于:async-batcher.ts:38

已完成(成功或失败)的批处理执行次数


size

ts
size: number;
size: number;

定义于:async-batcher.ts:42

当前批处理队列中的项数


status

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

定义于:async-batcher.ts:46

当前处理状态 - 未处理时为“idle”,等待超时时为“pending”,处理中时为“executing”,当有项但未配置等待时为“populated”


successCount

ts
successCount: number;
successCount: number;

定义于:async-batcher.ts:50

成功完成的批处理执行次数


总失败项数

ts
totalItemsFailed: number;
totalItemsFailed: number;

定义于:async-batcher.ts:54

所有批处理中处理失败的总项数


总处理项数

ts
totalItemsProcessed: number;
totalItemsProcessed: number;

定义于:async-batcher.ts:58

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

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

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

Bytes

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

订阅 Bytes

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

Bytes

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