chore(marshal): Accept review suggestions
MODIFY
packages/marshal/src/encodePassable.js
packages/marshal/src/encodePassable.js
@@ -298,10 +298,10 @@ const decodeTagged = (encoded, decodePassable) => {
/**
* @param {EncodeOptions} encodeOptions
- * @returns {(passable: Passable) => string}
- *
* encodeOptions is actually optional, but not marked as such to work around
* https://github.com/microsoft/TypeScript/issues/50286
+ *
+ * @returns {(passable: Passable) => string}
*/
export const makeEncodePassable = ({
encodeRemotable = (rem, _) => Fail`remotable unexpected: ${rem}`,

MODIFY
packages/marshal/src/encodeToCapData.js
packages/marshal/src/encodeToCapData.js
@@ -86,10 +86,10 @@ const dontEncodeErrorToCapData = err => Fail`error object unexpected: ${err}`;
/**
* @param {EncodeToCapDataOptions} encodeOptions
- * @returns {(passable: Passable) => Encoding}
- *
* encodeOptions is actually optional, but not marked as such to work around
* https://github.com/microsoft/TypeScript/issues/50286
+ *
+ * @returns {(passable: Passable) => Encoding}
*/
export const makeEncodeToCapData = ({
encodeRemotableToCapData = dontEncodeRemotableToCapData,

MODIFY
packages/marshal/src/encodeToSmallcaps.js
packages/marshal/src/encodeToSmallcaps.js
@@ -112,10 +112,10 @@ const dontEncodeErrorToSmallcaps = err =>
/**
* @param {EncodeToSmallcapsOptions} encodeOptions
- * @returns {(passable: Passable) => SmallcapsEncoding}
- *
* encodeOptions is actually optional, but not marked as such to work around
* https://github.com/microsoft/TypeScript/issues/50286
+ *
+ * @returns {(passable: Passable) => SmallcapsEncoding}
*/
export const makeEncodeToSmallcaps = ({
encodeRemotableToSmallcaps = dontEncodeRemotableToSmallcaps,
@@ -131,7 +131,7 @@ export const makeEncodeToSmallcaps = ({
const message = encoding['#error'];
(typeof message === 'string' &&
(!startsSpecial(message) || message.startsWith('!'))) ||
- Fail`internal: Error encoding must string message: ${q(message)}`;
+ Fail`internal: Error encoding must have string message: ${q(message)}`;
};
/**

chore(marshal): Accept review suggestions