(
chunk: Buffer | string,
encoding: BufferEncoding,
callback: (error?: Error | null) => void,
)
| 184 | private writeResolvers: Array<() => void> = []; |
| 185 | |
| 186 | override _write( |
| 187 | chunk: Buffer | string, |
| 188 | encoding: BufferEncoding, |
| 189 | callback: (error?: Error | null) => void, |
| 190 | ): void { |
| 191 | this.writeCount++; |
| 192 | this.totalBytes += |
| 193 | typeof chunk === "string" ? Buffer.byteLength(chunk, encoding) : chunk.byteLength; |
| 194 | this.writeTimes.push(performance.now()); |
| 195 | const resolver = this.writeResolvers.shift(); |
| 196 | if (resolver) resolver(); |
| 197 | callback(); |
| 198 | } |
| 199 | |
| 200 | /** |
| 201 | * Returns a promise that resolves on the next _write call. |
nothing calls this directly
no test coverage detected