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

BatcherState

Interface: BatcherState<TValue>

Defined in: batcher.ts:5

Type Parameters

TValue

Properties

executionCount

ts
executionCount: number;
executionCount: number;

Defined in: batcher.ts:9

Number of batch executions that have been completed


isEmpty

ts
isEmpty: boolean;
isEmpty: boolean;

Defined in: batcher.ts:13

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


isPending

ts
isPending: boolean;
isPending: boolean;

Defined in: batcher.ts:17

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


items

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

Defined in: batcher.ts:21

Array of items currently queued for batch processing


size

ts
size: number;
size: number;

Defined in: batcher.ts:25

Number of items currently in the batch queue


status

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

Defined in: batcher.ts:29

Current processing status - 'idle' when not processing, 'pending' when waiting for timeout


totalItemsProcessed

ts
totalItemsProcessed: number;
totalItemsProcessed: number;

Defined in: batcher.ts:33

Total number of items that have been processed across all batches