From b20b6759aefa4a15507e85f836c890f023515b72 Mon Sep 17 00:00:00 2001 From: Benjamin Gruenbaum Date: Sat, 5 Feb 2022 18:39:00 +0200 Subject: [PATCH] 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 --- doc/api/webstreams.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/webstreams.md b/doc/api/webstreams.md index 99514a58e91288..6c0605c6c35b3e 100644 --- a/doc/api/webstreams.md +++ b/doc/api/webstreams.md @@ -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()`