WriteAsync
WriteAsync = (
stream,chunk,encoding?) =>Promise<void>
Represents an asynchronous write function for Node.js writable streams.
Parameters
Section titled “Parameters”stream
Section titled “stream”Writable
The writable stream to which data should be written.
The data to write to the stream. Can be a Buffer or a string.
Buffer | string
encoding?
Section titled “encoding?”BufferEncoding
Optional encoding to use when chunk is a string.
Defaults to utf8 if omitted.
Returns
Section titled “Returns”Promise<void>
A promise that resolves when the data has been successfully written to the stream (including handling backpressure), or rejects if an error occurs.