mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
doc: fix webstream close reject state state doc
The `closed` promise may reject. Document the states where it rejects based on the spec. Fixes: https://github.com/nodejs/node/issues/41858 PR-URL: https://github.com/nodejs/node/pull/41860 Co-Authored-By: Mattias Buelens <mattias@buelens.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
1 parent
2b1dabfb16
commit
291fe631dd
1 file changed
+7
-5
@@ -425,7 +425,8 @@ added: v16.5.0
|
||||
-->
|
||||
|
||||
* Type: {Promise} Fulfilled with `undefined` when the associated
|
||||
{ReadableStream} is closed or this reader's lock is released.
|
||||
{ReadableStream} is closed or rejected if the stream errors or the reader's
|
||||
lock is released before the stream finishes closing.
|
||||
|
||||
#### `readableStreamDefaultReader.read()`
|
||||
|
||||
@@ -552,7 +553,8 @@ added: v16.5.0
|
||||
-->
|
||||
|
||||
* Type: {Promise} Fulfilled with `undefined` when the associated
|
||||
{ReadableStream} is closed or this reader's lock is released.
|
||||
{ReadableStream} is closed or rejected if the stream errors or the reader's
|
||||
lock is released before the stream finishes closing.
|
||||
|
||||
#### `readableStreamBYOBReader.read(view)`
|
||||
|
||||
@@ -902,9 +904,9 @@ Closes the `WritableStream` when no additional writes are expected.
|
||||
added: v16.5.0
|
||||
-->
|
||||
|
||||
* Type: A promise that is fulfilled with `undefined` when the
|
||||
associated {WritableStream} is closed or this writer's lock is
|
||||
released.
|
||||
* Type: {Promise} Fulfilled with `undefined` when the associated
|
||||
{WritableStream} is closed or rejected if the stream errors or the writer's
|
||||
lock is released before the stream finishes closing.
|
||||
|
||||
#### `writableStreamDefaultWriter.desiredSize`
|
||||
|
||||
|
||||
Reference in new issue
Block a user