Framework
Version
Debouncer API Reference
Throttler API Reference
Rate Limiter API Reference
Queue API Reference
Batcher API Reference

AsyncBatcherState

Interface: AsyncBatcherState<TValue>

Defined in: async-batcher.ts:5

Type Parameters

TValue

Properties

errorCount

ts
errorCount: number;
errorCount: number;

Defined in: async-batcher.ts:9

Number of batch executions that have resulted in errors


failedItems

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

Defined in: async-batcher.ts:13

Array of items that failed during batch processing


isEmpty

ts
isEmpty: boolean;
isEmpty: boolean;

Defined in: async-batcher.ts:17

Whether the batcher has no items to process (items array is empty)


isExecuting

ts
isExecuting: boolean;
isExecuting: boolean;

Defined in: async-batcher.ts:21

Whether a batch is currently being processed asynchronously


isPending

ts
isPending: boolean;
isPending: boolean;

Defined in: async-batcher.ts:25

Whether the batcher is waiting for the timeout to trigger batch processing


items

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

Defined in: async-batcher.ts:29

Array of items currently queued for batch processing


lastResult

ts
lastResult: any;
lastResult: any;

Defined in: async-batcher.ts:33

The result from the most recent batch execution


settleCount

ts
settleCount: number;
settleCount: number;

Defined in: async-batcher.ts:37

Number of batch executions that have completed (either successfully or with errors)


size

ts
size: number;
size: number;

Defined in: async-batcher.ts:41

Number of items currently in the batch queue


status

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

Defined in: async-batcher.ts:45

Current processing status - 'idle' when not processing, 'pending' when waiting for timeout, 'executing' when processing, 'populated' when items are present, but no wait is configured


successCount

ts
successCount: number;
successCount: number;

Defined in: async-batcher.ts:49

Number of batch executions that have completed successfully


totalItemsFailed

ts
totalItemsFailed: number;
totalItemsFailed: number;

Defined in: async-batcher.ts:53

Total number of items that have failed processing across all batches


totalItemsProcessed

ts
totalItemsProcessed: number;
totalItemsProcessed: number;

Defined in: async-batcher.ts:57

Total number of items that have been processed across all batches