Skip to content

Commit

Permalink
doc: fix webstream close reject state state doc
Browse files Browse the repository at this point in the history
The `closed` promise may reject. Document the states where it rejects
based on the spec.

Fixes: #41858
Co-Authored-By: Mattias Buelens <mattias@buelens.com>
  • Loading branch information
benjamingr and MattiasBuelens committed Feb 5, 2022
1 parent 217acb9 commit 97d341a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/api/webstreams.md
Expand Up @@ -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()`

Expand Down Expand Up @@ -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)`
Expand Down

0 comments on commit 97d341a

Please sign in to comment.