Skip to content

Commit b20b675

Browse files
committed
doc: fix webstream close reject state state doc
The `closed` promise may reject. Document the states where it rejects based on the spec. Fixes: #41858
1 parent 217acb9 commit b20b675

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/webstreams.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,8 @@ added: v16.5.0
425425
-->
426426

427427
* Type: {Promise} Fulfilled with `undefined` when the associated
428-
{ReadableStream} is closed or this reader's lock is released.
428+
{ReadableStream} is closed or rejected if the stream errors or the reader's
429+
lock is released before the stream finishes closing.
429430

430431
#### `readableStreamDefaultReader.read()`
431432

0 commit comments

Comments
 (0)