()
| 197 | } |
| 198 | |
| 199 | async #processPendingBatches(): Promise<void> { |
| 200 | const pending = this.pending |
| 201 | this.pending = new Map() |
| 202 | |
| 203 | for (const [group, items] of pending) { |
| 204 | const getItems = items.filter(([options]) => options.request.method === 'GET') |
| 205 | const restItems = items.filter(([options]) => options.request.method !== 'GET') |
| 206 | |
| 207 | this.#executeBatch('GET', group, getItems) |
| 208 | this.#executeBatch('POST', group, restItems) |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | async #executeBatch( |
| 213 | method: 'GET' | 'POST', |