Open History to see the last commit
1---
2id: AsyncBatcherState
3title: AsyncBatcherState
4---
5
6Defined in: [async-batcher.ts:8](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-batcher.ts#L8)
7
8## Type Parameters
9
10### TValue
11
12`TValue`
13
14## Properties
15
16### errorCount
17
18```ts
19errorCount: number;
20```
21
22Defined in: [async-batcher.ts:12](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-batcher.ts#L12)
23
24Number of batch executions that have resulted in errors
25
26***
27
28### executionCount
29
30```ts
31executionCount: number;
32```
33
34Defined in: [async-batcher.ts:16](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-batcher.ts#L16)
35
36Number of batch executions that have been started
37
38***
39
40### failedItems
41
42```ts
43failedItems: TValue[];
44```
45
46Defined in: [async-batcher.ts:20](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-batcher.ts#L20)
47
48Array of items that failed during batch processing
49
50***
51
52### isEmpty
53
54```ts
55isEmpty: boolean;
56```
57
58Defined in: [async-batcher.ts:24](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-batcher.ts#L24)
59
60Whether the batcher has no items to process (items array is empty)
61
62***
63
64### isExecuting
65
66```ts
67isExecuting: boolean;
68```
69
70Defined in: [async-batcher.ts:28](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-batcher.ts#L28)
71
72Whether a batch is currently being processed asynchronously
73
74***
75
76### isPending
77
78```ts
79isPending: boolean;
80```
81
82Defined in: [async-batcher.ts:32](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-batcher.ts#L32)
83
84Whether the batcher is waiting for the timeout to trigger batch processing
85
86***
87
88### items
89
90```ts
91items: TValue[];
92```
93
94Defined in: [async-batcher.ts:36](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-batcher.ts#L36)
95
96Array of items currently queued for batch processing
97
98***
99
100### lastResult
101
102```ts
103lastResult: any;
104```
105
106Defined in: [async-batcher.ts:40](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-batcher.ts#L40)
107
108The result from the most recent batch execution
109
110***
111
112### settleCount
113
114```ts
115settleCount: number;
116```
117
118Defined in: [async-batcher.ts:44](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-batcher.ts#L44)
119
120Number of batch executions that have completed (either successfully or with errors)
121
122***
123
124### size
125
126```ts
127size: number;
128```
129
130Defined in: [async-batcher.ts:48](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-batcher.ts#L48)
131
132Number of items currently in the batch queue
133
134***
135
136### status
137
138```ts
139status: "idle" | "executing" | "pending" | "populated";
140```
141
142Defined in: [async-batcher.ts:52](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-batcher.ts#L52)
143
144Current processing status - 'idle' when not processing, 'pending' when waiting for timeout, 'executing' when processing, 'populated' when items are present, but no wait is configured
145
146***
147
148### successCount
149
150```ts
151successCount: number;
152```
153
154Defined in: [async-batcher.ts:56](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-batcher.ts#L56)
155
156Number of batch executions that have completed successfully
157
158***
159
160### totalItemsFailed
161
162```ts
163totalItemsFailed: number;
164```
165
166Defined in: [async-batcher.ts:60](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-batcher.ts#L60)
167
168Total number of items that have failed processing across all batches
169
170***
171
172### totalItemsProcessed
173
174```ts
175totalItemsProcessed: number;
176```
177
178Defined in: [async-batcher.ts:64](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-batcher.ts#L64)
179
180Total number of items that have been processed across all batches