Skip to content
Source
Sign inSign up
TanStack/pacer
Open History to see the last commit

BatcherState.md

96 lines1.7 KB

1---
2id: BatcherState
3title: BatcherState
4---
5​
6Defined in: [batcher.ts:6](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/batcher.ts#L6)
7​
8## Type Parameters
9​
10### TValue
11​
12`TValue`
13​
14## Properties
15​
16### executionCount
17​
18```ts
19executionCount: number;
20```
21​
22Defined in: [batcher.ts:10](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/batcher.ts#L10)
23​
24Number of batch executions that have been completed
25​
26***
27​
28### isEmpty
29​
30```ts
31isEmpty: boolean;
32```
33​
34Defined in: [batcher.ts:14](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/batcher.ts#L14)
35​
36Whether the batcher has no items to process (items array is empty)
37​
38***
39​
40### isPending
41​
42```ts
43isPending: boolean;
44```
45​
46Defined in: [batcher.ts:18](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/batcher.ts#L18)
47​
48Whether the batcher is waiting for the timeout to trigger batch processing
49​
50***
51​
52### items
53​
54```ts
55items: TValue[];
56```
57​
58Defined in: [batcher.ts:22](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/batcher.ts#L22)
59​
60Array of items currently queued for batch processing
61​
62***
63​
64### size
65​
66```ts
67size: number;
68```
69​
70Defined in: [batcher.ts:26](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/batcher.ts#L26)
71​
72Number of items currently in the batch queue
73​
74***
75​
76### status
77​
78```ts
79status: "idle" | "pending";
80```
81​
82Defined in: [batcher.ts:30](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/batcher.ts#L30)
83​
84Current processing status - 'idle' when not processing, 'pending' when waiting for timeout
85​
86***
87​
88### totalItemsProcessed
89​
90```ts
91totalItemsProcessed: number;
92```
93​
94Defined in: [batcher.ts:34](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/batcher.ts#L34)
95​
96Total number of items that have been processed across all batches