From 8101f2b2597ffb0b717aa413a93cd688ca6d07d0 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 ed8cddd2fdb..a8a111caef6 100644 --- a/doc/api/webstreams.md +++ b/doc/api/webstreams.md @@ -1219,13 +1219,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` @@ -1256,13 +1256,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 df114a44cc8..ee416910683 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.