@@ -220,7 +220,7 @@ that closes when the bucket is full:
220220
221221* ** Pending writes (the hose)** -- writes waiting for slot space. After
222222 the consumer drains, pending writes are promoted into the now-empty
223- slots and their promises resolve .
223+ slots and their promises settle .
224224
225225How each policy uses these buffers:
226226
@@ -430,7 +430,7 @@ The value is always non-negative.
430430* ` options ` {Object}
431431 * ` signal ` {AbortSignal} Cancel just this operation. The signal cancels only
432432 the pending ` end() ` call; it does not fail the writer itself.
433- * Returns: {Promise\< number>} Total bytes written.
433+ * Returns: {Promise} Fulfills with the total number of bytes written.
434434
435435Signal that no more data will be written.
436436
@@ -463,9 +463,9 @@ transition with no async work to perform.
463463* ` options ` {Object}
464464 * ` signal ` {AbortSignal} Cancel just this write operation. The signal cancels
465465 only the pending ` write() ` call; it does not fail the writer itself.
466- * Returns: {Promise\< void>}
466+ * Returns: {Promise} Fulfills with ` undefined ` when buffer space is available.
467467
468- Write a chunk. The promise resolves when buffer space is available.
468+ Write a chunk.
469469
470470#### ` writer.writeSync(chunk) `
471471
@@ -481,7 +481,7 @@ Synchronous write. Does not block; returns `false` if backpressure is active.
481481* ` options ` {Object}
482482 * ` signal ` {AbortSignal} Cancel just this write operation. The signal cancels
483483 only the pending ` writev() ` call; it does not fail the writer itself.
484- * Returns: {Promise\< void> }
484+ * Returns: {Promise}
485485
486486Write multiple chunks as a single batch.
487487
@@ -603,7 +603,7 @@ added: v25.9.0
603603 the source ends. ** Default:** ` false ` .
604604 * ` preventFail ` {boolean} If ` true ` , do not call ` writer.fail() ` on
605605 error. ** Default:** ` false ` .
606- * Returns: {Promise\< number>} Total bytes written.
606+ * Returns: {Promise} Fulfills with the total number of bytes written.
607607
608608Pipe a source through transforms into a writer. If the writer has a
609609` writev(chunks) ` method, entire batches are passed in a single call (enabling
@@ -903,7 +903,7 @@ added: v25.9.0
903903 * ` signal ` {AbortSignal}
904904 * ` limit ` {number} Maximum number of bytes to consume. If the total bytes
905905 collected exceeds limit, an ` ERR_OUT_OF_RANGE ` error is thrown
906- * Returns: {Promise\< Uint8Array \[ ] >}
906+ * Returns: {Promise} Fulfills with an array of ` Uint8Array ` objects.
907907
908908Collect all chunks as an array of ` Uint8Array ` values (without concatenating).
909909
@@ -918,7 +918,7 @@ added: v25.9.0
918918 * ` signal ` {AbortSignal}
919919 * ` limit ` {number} Maximum number of bytes to consume. If the total bytes
920920 collected exceeds limit, an ` ERR_OUT_OF_RANGE ` error is thrown
921- * Returns: {Promise\< ArrayBuffer>}
921+ * Returns: {Promise} Fulfills with an ` ArrayBuffer ` object.
922922
923923Collect all bytes into an ` ArrayBuffer ` .
924924
@@ -961,7 +961,7 @@ added: v25.9.0
961961 * ` signal ` {AbortSignal}
962962 * ` limit ` {number} Maximum number of bytes to consume. If the total bytes
963963 collected exceeds limit, an ` ERR_OUT_OF_RANGE ` error is thrown
964- * Returns: {Promise\< Uint8Array>}
964+ * Returns: {Promise} Fulfills with an ` Uint8Array ` object.
965965
966966Collect all bytes from a stream into a single ` Uint8Array ` .
967967
@@ -1009,7 +1009,7 @@ added: v25.9.0
10091009 * ` signal ` {AbortSignal}
10101010 * ` limit ` {number} Maximum number of bytes to consume. If the total bytes
10111011 collected exceeds limit, an ` ERR_OUT_OF_RANGE ` error is thrown
1012- * Returns: {Promise\< string>}
1012+ * Returns: {Promise} Fulfills with a ` string ` .
10131013
10141014Collect all bytes and decode as text.
10151015
@@ -1053,11 +1053,11 @@ added: v25.9.0
10531053-->
10541054
10551055* ` drainable ` {Object} An object implementing the drainable protocol.
1056- * Returns: {Promise\< boolean> |null}
1056+ * Returns: {Promise|null}
10571057
1058- Wait for a drainable writer's backpressure to clear. Returns a promise that
1059- resolves to ` true ` when the writer can accept more data , or ` null ` if the
1060- object does not implement the drainable protocol .
1058+ Wait for a drainable writer's backpressure to clear. Returns ` null ` if
1059+ the object does not implement the drainable protocol , or a promise that
1060+ fulfills with ` true ` when the writer can accept more data .
10611061
10621062``` mjs
10631063import { push , ondrain , text } from ' node:stream/iter' ;
@@ -1768,8 +1768,8 @@ text(consumer).then(console.log); // 'hello'
17681768* Value: ` Symbol.for('Stream.drainableProtocol') `
17691769
17701770Implement to make a writer compatible with ` ondrain() ` . The method should
1771- return a promise that resolves when backpressure clears , or ` null ` if no
1772- backpressure.
1771+ return ` null ` if no backpressure, or a promise that fulfills with a truthy value
1772+ when backpressure clears .
17731773
17741774``` mjs
17751775import { ondrain } from ' node:stream/iter' ;
@@ -1975,8 +1975,8 @@ console.log(textSync(consumer)); // 'hello'
19751975The value must be a function that converts the object into a streamable value.
19761976When the object is encountered anywhere in the streaming pipeline (as a source
19771977passed to ` from ()` , or as a value returned from a transform), this method is
1978- called to produce the actual data. It may return (or resolve to) any streamable
1979- value: a string, ` Uint8Array ` , ` AsyncIterable` , ` Iterable` , or another streamable
1978+ called to produce the actual data. It may return any value that resolves to:
1979+ a string, ` Uint8Array ` , ` AsyncIterable` , ` Iterable` , or another streamable
19801980object.
19811981
19821982` ` ` mjs
0 commit comments