From e55b63dc272821ee5b39f48e75a2d1ca93144ede Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Wed, 26 Oct 2022 15:34:20 -0700 Subject: [PATCH] chore: work around https://github.com/microsoft/TypeScript/issues/50286 --- packages/lp32/reader.js | 2 +- packages/lp32/writer.js | 2 +- packages/marshal/src/encodeToCapData.js | 4 ++-- packages/marshal/src/encodeToSmallcaps.js | 4 ++-- packages/marshal/src/marshal.js | 2 +- packages/netstring/reader.js | 2 +- packages/netstring/writer.js | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/lp32/reader.js b/packages/lp32/reader.js index d7b8f03720..e63d76dcf6 100644 --- a/packages/lp32/reader.js +++ b/packages/lp32/reader.js @@ -10,7 +10,7 @@ const { details: X, quote: q } = assert; /** * @param {Iterable | AsyncIterable} reader - * @param {Object} [opts] + * @param {Object} opts * @param {string=} [opts.name] * @param {number} [opts.maxMessageLength] - defaults to 1MB * @param {boolean=} [opts.littleEndian] diff --git a/packages/lp32/writer.js b/packages/lp32/writer.js index d5156e9766..3cf8b52763 100644 --- a/packages/lp32/writer.js +++ b/packages/lp32/writer.js @@ -7,7 +7,7 @@ const { details: X, quote: q } = assert; /** * @param {import('@endo/stream').Writer} output - * @param {Object} [opts] + * @param {Object} opts * @param {number} [opts.maxMessageLength] - defaults to 1MB * @param {string} [opts.name] * @param {boolean} [opts.littleEndian] - defaults to host byte order diff --git a/packages/marshal/src/encodeToCapData.js b/packages/marshal/src/encodeToCapData.js index 6638c09155..bb5b1ca54e 100644 --- a/packages/marshal/src/encodeToCapData.js +++ b/packages/marshal/src/encodeToCapData.js @@ -90,7 +90,7 @@ const dontEncodeErrorToCapData = err => assert.fail(X`error object unexpected: ${err}`); /** - * @param {EncodeToCapDataOptions} [encodeOptions] + * @param {EncodeToCapDataOptions} encodeOptions * @returns {(passable: Passable) => Encoding} */ export const makeEncodeToCapData = ({ @@ -308,7 +308,7 @@ const dontDecodeErrorFromCapData = errorEncoding => * API where these can reliably differ. * See https://github.com/Agoric/agoric-sdk/issues/4334 * - * @param {DecodeOptions} [decodeOptions] + * @param {DecodeOptions} decodeOptions * @returns {(encoded: Encoding) => Passable} */ export const makeDecodeFromCapData = ({ diff --git a/packages/marshal/src/encodeToSmallcaps.js b/packages/marshal/src/encodeToSmallcaps.js index 4dba916ec4..15f94d14eb 100644 --- a/packages/marshal/src/encodeToSmallcaps.js +++ b/packages/marshal/src/encodeToSmallcaps.js @@ -114,7 +114,7 @@ const dontEncodeErrorToSmallcaps = err => assert.fail(X`error object unexpected: ${q(err)}`); /** - * @param {EncodeToSmallcapsOptions} [encodeOptions] + * @param {EncodeToSmallcapsOptions} encodeOptions * @returns {(passable: Passable) => SmallcapsEncoding} */ export const makeEncodeToSmallcaps = ({ @@ -343,7 +343,7 @@ const dontDecodeErrorFromSmallcaps = encoding => assert.fail(X`error unexpected: ${q(encoding)}`); /** - * @param {DecodeFromSmallcapsOptions=} decodeOptions + * @param {DecodeFromSmallcapsOptions} decodeOptions * @returns {(encoded: SmallcapsEncoding) => Passable} */ export const makeDecodeFromSmallcaps = ({ diff --git a/packages/marshal/src/marshal.js b/packages/marshal/src/marshal.js index b8ee9bf625..83def9e883 100644 --- a/packages/marshal/src/marshal.js +++ b/packages/marshal/src/marshal.js @@ -41,7 +41,7 @@ const defaultSlotToValFn = (x, _) => x; * @template Slot * @param {ConvertValToSlot} [convertValToSlot] * @param {ConvertSlotToVal} [convertSlotToVal] - * @param {MakeMarshalOptions} [options] + * @param {MakeMarshalOptions} options */ export const makeMarshal = ( convertValToSlot = defaultValToSlotFn, diff --git a/packages/netstring/reader.js b/packages/netstring/reader.js index ce06b9101c..f8c644b269 100644 --- a/packages/netstring/reader.js +++ b/packages/netstring/reader.js @@ -8,7 +8,7 @@ const NINE = '9'.charCodeAt(0); /** * @param {Iterable | AsyncIterable} input - * @param {Object} [opts] + * @param {Object} opts * @param {string} [opts.name] * @param {number} [opts.maxMessageLength] */ diff --git a/packages/netstring/writer.js b/packages/netstring/writer.js index f7f67ebc46..d85fe29588 100644 --- a/packages/netstring/writer.js +++ b/packages/netstring/writer.js @@ -20,7 +20,7 @@ const getLengthPrefixCharCodes = length => * to avoid pre-concatenating them. * * @param {import('@endo/stream').Writer} output - * @param {object} [opts] + * @param {object} opts * @param {boolean} [opts.chunked] * @returns {import('@endo/stream').Writer} */