chore: work around
MODIFY
packages/lp32/reader.js
packages/lp32/reader.js
@@ -10,7 +10,7 @@ const { details: X, quote: q } = assert;
/**
* @param {Iterable<Uint8Array> | AsyncIterable<Uint8Array>} reader
- * @param {Object} [opts]
+ * @param {Object} opts
* @param {string=} [opts.name]
* @param {number} [opts.maxMessageLength] - defaults to 1MB
* @param {boolean=} [opts.littleEndian]

MODIFY
packages/lp32/writer.js
packages/lp32/writer.js
@@ -7,7 +7,7 @@ const { details: X, quote: q } = assert;
/**
* @param {import('@endo/stream').Writer<Uint8Array, undefined>} 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

MODIFY
packages/marshal/src/encodeToCapData.js
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 = ({

MODIFY
packages/marshal/src/encodeToSmallcaps.js
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 = ({

MODIFY
packages/marshal/src/marshal.js
packages/marshal/src/marshal.js
@@ -41,7 +41,7 @@ const defaultSlotToValFn = (x, _) => x;
* @template Slot
* @param {ConvertValToSlot<Slot>} [convertValToSlot]
* @param {ConvertSlotToVal<Slot>} [convertSlotToVal]
- * @param {MakeMarshalOptions} [options]
+ * @param {MakeMarshalOptions} options
*/
export const makeMarshal = (
convertValToSlot = defaultValToSlotFn,

MODIFY
packages/netstring/reader.js
packages/netstring/reader.js
@@ -8,7 +8,7 @@ const NINE = '9'.charCodeAt(0);
/**
* @param {Iterable<Uint8Array> | AsyncIterable<Uint8Array>} input
- * @param {Object} [opts]
+ * @param {Object} opts
* @param {string} [opts.name]
* @param {number} [opts.maxMessageLength]
*/

MODIFY
packages/netstring/writer.js
packages/netstring/writer.js
@@ -20,7 +20,7 @@ const getLengthPrefixCharCodes = length =>
* to avoid pre-concatenating them.
*
* @param {import('@endo/stream').Writer<Uint8Array, undefined>} output
- * @param {object} [opts]
+ * @param {object} opts
* @param {boolean} [opts.chunked]
* @returns {import('@endo/stream').Writer<Uint8Array | Uint8Array[], undefined>}
*/

chore: work around https://github.com/microsoft/TypeScript/issues/50286