From 637db4e79dc9af4aa9079b72239df65c15d24b83 Mon Sep 17 00:00:00 2001 From: OneNail Date: Tue, 3 May 2022 10:07:43 +0800 Subject: [PATCH] doc: fix errors in Web Streams doc PR-URL: https://github.com/nodejs/node/pull/42862 Reviewed-By: Luigi Pinca Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Mestery Reviewed-By: Harshitha K P Reviewed-By: Akhil Marsonya Reviewed-By: Zeyu Yang Reviewed-By: Rich Trott --- doc/api/webstreams.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/doc/api/webstreams.md b/doc/api/webstreams.md index 6fded7bf576ac9..acfaeabd3396a0 100644 --- a/doc/api/webstreams.md +++ b/doc/api/webstreams.md @@ -210,10 +210,10 @@ added: v16.5.0 * `preventAbort` {boolean} When `true`, errors in this `ReadableStream` will not cause `transform.writable` to be aborted. * `preventCancel` {boolean} When `true`, errors in the destination - `transform.writable` is not cause this `ReadableStream` to be + `transform.writable` do not cause this `ReadableStream` to be canceled. * `preventClose` {boolean} When `true`, closing this `ReadableStream` - will no cause `transform.writable` to be closed. + does not cause `transform.writable` to be closed. * `signal` {AbortSignal} Allows the transfer of data to be canceled using an {AbortController}. * Returns: {ReadableStream} From `transform.readable`. @@ -287,12 +287,11 @@ added: v16.5.0 `ReadableStream`'s data will be written. * `options` {Object} * `preventAbort` {boolean} When `true`, errors in this `ReadableStream` - will not cause `transform.writable` to be aborted. - * `preventCancel` {boolean} When `true`, errors in the destination - `transform.writable` is not cause this `ReadableStream` to be - canceled. + will not cause `destination` to be aborted. + * `preventCancel` {boolean} When `true`, errors in the `destination` + will not cause this `ReadableStream` to be canceled. * `preventClose` {boolean} When `true`, closing this `ReadableStream` - will no cause `transform.writable` to be closed. + does not cause `destination` to be closed. * `signal` {AbortSignal} Allows the transfer of data to be canceled using an {AbortController}. * Returns: A promise fulfilled with `undefined` @@ -323,7 +322,7 @@ added: v16.5.0 * `options` {Object} * `preventCancel` {boolean} When `true`, prevents the {ReadableStream} from being closed when the async iterator abruptly terminates. - **Defaults**: `false` + **Default**: `false`. Creates and returns an async iterator usable for consuming this `ReadableStream`'s data. @@ -457,7 +456,7 @@ added: v16.5.0 --> The `ReadableStreamBYOBReader` is an alternative consumer for -byte-oriented {ReadableStream}'s (those that are created with +byte-oriented {ReadableStream}s (those that are created with `underlyingSource.type` set equal to `'bytes'` when the `ReadableStream` was created).