()
| 37 | } |
| 38 | |
| 39 | function flush(): void { |
| 40 | if (pendingOverflow) { |
| 41 | writeFn(pendingOverflow.join('')) |
| 42 | pendingOverflow = null |
| 43 | } |
| 44 | if (buffer.length === 0) return |
| 45 | writeFn(buffer.join('')) |
| 46 | buffer = [] |
| 47 | bufferBytes = 0 |
| 48 | clearTimer() |
| 49 | } |
| 50 | |
| 51 | function scheduleFlush(): void { |
| 52 | if (!flushTimer) { |
no test coverage detected