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