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

Type Parameters

TValue

Properties

errorCount

errorCount: number;
errorCount: number;

Defined in: async-batcher.ts:10

Number of batch executions that have resulted in errors


failedItems

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

Defined in: async-batcher.ts:14

Array of items that failed during batch processing


isEmpty

isEmpty: boolean;
isEmpty: boolean;

Defined in: async-batcher.ts:18

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


isExecuting

isExecuting: boolean;
isExecuting: boolean;

Defined in: async-batcher.ts:22

Whether a batch is currently being processed asynchronously


isPending

isPending: boolean;
isPending: boolean;

Defined in: async-batcher.ts:26

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


items

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

Defined in: async-batcher.ts:30

Array of items currently queued for batch processing


lastResult

lastResult: any;
lastResult: any;

Defined in: async-batcher.ts:34

The result from the most recent batch execution


settleCount

settleCount: number;
settleCount: number;

Defined in: async-batcher.ts:38

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


size

size: number;
size: number;

Defined in: async-batcher.ts:42

Number of items currently in the batch queue


status

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

Defined in: async-batcher.ts:46

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

successCount: number;
successCount: number;

Defined in: async-batcher.ts:50

Number of batch executions that have completed successfully


totalItemsFailed

totalItemsFailed: number;
totalItemsFailed: number;

Defined in: async-batcher.ts:54

Total number of items that have failed processing across all batches


totalItemsProcessed

totalItemsProcessed: number;
totalItemsProcessed: number;

Defined in: async-batcher.ts:58

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.