* Flush batch queue manually (send all pending requests immediately)
()
| 97 | * Flush batch queue manually (send all pending requests immediately) |
| 98 | */ |
| 99 | async flush(): Promise<void> { |
| 100 | if (this.timer) { |
| 101 | clearTimeout(this.timer as any); |
| 102 | this.timer = null; |
| 103 | } |
| 104 | |
| 105 | if (this.queue.length > 0) { |
| 106 | await this.sendBatch(); |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * Clear batch queue without sending |
no test coverage detected