()
| 2439 | } |
| 2440 | // Close the stream |
| 2441 | async close(): Promise<void> { |
| 2442 | await this.flush(); |
| 2443 | return new Promise((resolve, reject) => { |
| 2444 | this.writeStream.end((error: Error | undefined) => { |
| 2445 | if (error) { |
| 2446 | reject(error); |
| 2447 | } else { |
| 2448 | resolve(); |
| 2449 | } |
| 2450 | }); |
| 2451 | }); |
| 2452 | } |
| 2453 | } |
| 2454 | // Buffer accumulator class for batching writes and reducing Promise overhead (kept for compatibility) |
| 2455 | class BufferAccumulator { |
no test coverage detected