From bf22a5f66ed8fa5e5baf8de4aa41df8f6d7f7ecc Mon Sep 17 00:00:00 2001 From: Hyunjin Kim Date: Sun, 20 Aug 2023 01:15:22 +0900 Subject: [PATCH] doc: use same name in the doc as in the code Refs: https://streams.spec.whatwg.org/#bytelengthqueuingstrategy PR-URL: https://github.com/nodejs/node/pull/49216 Reviewed-By: Antoine du Hamel Reviewed-By: Deokjin Kim Reviewed-By: Luigi Pinca --- doc/api/webstreams.md | 8 ++++---- lib/internal/webstreams/queuingstrategies.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/api/webstreams.md b/doc/api/webstreams.md index 4d487d9d05ded7..4635e414fd89d0 100644 --- a/doc/api/webstreams.md +++ b/doc/api/webstreams.md @@ -1172,13 +1172,13 @@ changes: description: This class is now exposed on the global object. --> -#### `new ByteLengthQueuingStrategy(options)` +#### `new ByteLengthQueuingStrategy(init)` -* `options` {Object} +* `init` {Object} * `highWaterMark` {number} #### `byteLengthQueuingStrategy.highWaterMark` @@ -1209,13 +1209,13 @@ changes: description: This class is now exposed on the global object. --> -#### `new CountQueuingStrategy(options)` +#### `new CountQueuingStrategy(init)` -* `options` {Object} +* `init` {Object} * `highWaterMark` {number} #### `countQueuingStrategy.highWaterMark` diff --git a/lib/internal/webstreams/queuingstrategies.js b/lib/internal/webstreams/queuingstrategies.js index df114a44cc8adc..ee4169106838c3 100644 --- a/lib/internal/webstreams/queuingstrategies.js +++ b/lib/internal/webstreams/queuingstrategies.js @@ -78,7 +78,7 @@ class ByteLengthQueuingStrategy { constructor(init) { validateObject(init, 'init'); if (init.highWaterMark === undefined) - throw new ERR_MISSING_OPTION('options.highWaterMark'); + throw new ERR_MISSING_OPTION('init.highWaterMark'); // The highWaterMark value is not checked until the strategy // is actually used, per the spec. @@ -133,7 +133,7 @@ class CountQueuingStrategy { constructor(init) { validateObject(init, 'init'); if (init.highWaterMark === undefined) - throw new ERR_MISSING_OPTION('options.highWaterMark'); + throw new ERR_MISSING_OPTION('init.highWaterMark'); // The highWaterMark value is not checked until the strategy // is actually used, per the spec.