Skip to content

nodeWriteAsync

nodeWriteAsync(stream, chunk): Promise<void>

Defined in: packages/node/src/stream/write-async.ts:12

Writes chunk to stream, resolving once the write completes (or rejecting on error).

Only wraps the write callback — a stream that fails also emits its own "error" event, and an unhandled one crashes the process; attaching a listener for that is the stream owner’s job for the stream’s whole lifetime, not this per-write helper’s.

Writable

string | Uint8Array<ArrayBufferLike>

Promise<void>