chore(types): *Serialize -> *CapData
MODIFY
packages/marshal/src/marshal.js
packages/marshal/src/marshal.js
@@ -21,8 +21,8 @@ import {
/** @typedef {import('./types.js').MakeMarshalOptions} MakeMarshalOptions */
/** @template Slot @typedef {import('./types.js').ConvertSlotToVal<Slot>} ConvertSlotToVal */
/** @template Slot @typedef {import('./types.js').ConvertValToSlot<Slot>} ConvertValToSlot */
-/** @template Slot @typedef {import('./types.js').Serialize<Slot>} Serialize */
-/** @template Slot @typedef {import('./types.js').Unserialize<Slot>} Unserialize */
+/** @template Slot @typedef {import('./types.js').ToCapData<Slot>} ToCapData */
+/** @template Slot @typedef {import('./types.js').FromCapData<Slot>} FromCapData */
/** @typedef {import('./types.js').Passable} Passable */
/** @typedef {import('./types.js').InterfaceSpec} InterfaceSpec */
/** @typedef {import('./types.js').Encoding} Encoding */
@@ -71,7 +71,7 @@ export const makeMarshal = (
};
/**
- * @type {Serialize<Slot>}
+ * @type {ToCapData<Slot>}
*/
const serialize = root => {
const slots = [];
@@ -340,7 +340,7 @@ export const makeMarshal = (
};
/**
- * @type {Unserialize<Slot>}
+ * @type {FromCapData<Slot>}
*/
const unserialize = data => {
const { body, slots } = data;

MODIFY
packages/marshal/src/types.js
packages/marshal/src/types.js
@@ -84,14 +84,14 @@ export {};
/**
* @template Slot
- * @callback Serialize
+ * @callback ToCapData
* @param {Passable} val
* @returns {CapData<Slot>}
*/
/**
* @template Slot
- * @callback Unserialize
+ * @callback FromCapData
* @param {CapData<Slot>} data
* @returns {Passable}
*/
@@ -99,8 +99,8 @@ export {};
/**
* @template Slot
* @typedef {Object} Marshal
- * @property {Serialize<Slot>} serialize
- * @property {Unserialize<Slot>} unserialize
+ * @property {ToCapData<Slot>} serialize
+ * @property {FromCapData<Slot>} unserialize
*/
/**

chore(types): *Serialize -> *CapData