Documentation
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:6

Type Parameters

TValue

Properties

executionCount

executionCount: number;
executionCount: number;

Defined in: batcher.ts:10

Number of batch executions that have been completed


isEmpty

isEmpty: boolean;
isEmpty: boolean;

Defined in: batcher.ts:14

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


isPending

isPending: boolean;
isPending: boolean;

Defined in: batcher.ts:18

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


items

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

Defined in: batcher.ts:22

Array of items currently queued for batch processing


size

size: number;
size: number;

Defined in: batcher.ts:26

Number of items currently in the batch queue


status

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

Defined in: batcher.ts:30

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


totalItemsProcessed

totalItemsProcessed: number;
totalItemsProcessed: number;

Defined in: batcher.ts:34

Total number of items that have been processed across all batches

Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.

Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.