(content: any)
| 29 | } |
| 30 | |
| 31 | performWrite(content: any): void | PromiseLike<void> { |
| 32 | return new Promise((resolve) => { |
| 33 | if (!this.writeStream.write(content)) { |
| 34 | this.writeStream.once('drain', () => { |
| 35 | resolve() // Resolve the promise if write is successful |
| 36 | }) |
| 37 | } else { |
| 38 | resolve() // Resolve the promise if write is successful |
| 39 | } |
| 40 | }) |
| 41 | } |
| 42 | |
| 43 | end(): Promise<void> { |
| 44 | if (!this.writeStream){ |