Skip to content

Commit

Permalink
chore(patterns): define Key using parameterized Passable
Browse files Browse the repository at this point in the history
chore(patterns): define Key using parameterized Passable
  • Loading branch information
dckc authored and turadg committed Jan 11, 2024
1 parent ae6ad15 commit 81aced1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/patterns/src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export {};

/** @typedef {import('@endo/pass-style').Passable} Passable */
/** @typedef {import('@endo/pass-style').PassStyle} PassStyle */
/** @typedef {import('@endo/pass-style').RemotableObject} RemotableObject */
/**
* @template {string} [Tag=string]
* @template {Passable} [Payload=Passable]
Expand All @@ -22,7 +23,7 @@ export {};
/** @typedef {import('@endo/marshal').RankCover} RankCover */

/**
* @typedef {Passable} Key
* @typedef {import('@endo/pass-style').Passable<RemotableObject, never>} Key
*
* Keys are Passable arbitrarily-nested pass-by-copy containers
* (CopyArray, CopyRecord, CopySet, CopyBag, CopyMap) in which every
Expand Down
1 change: 1 addition & 0 deletions packages/patterns/test/test-patterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ const runTests = (t, successCase, failCase) => {
t.throws(
() => {
copyMapComparison || Fail`No CopyMap comparison support`;
// @ts-expect-error FIXME Key types
successCase(specimen, M.gt(makeCopyMap([])));
},
{ message: 'No CopyMap comparison support' },
Expand Down

0 comments on commit 81aced1

Please sign in to comment.