diff --git a/packages/orchestration/src/types.ts b/packages/orchestration/src/types.ts index 57f0783f2924..f87f99d34613 100644 --- a/packages/orchestration/src/types.ts +++ b/packages/orchestration/src/types.ts @@ -14,17 +14,9 @@ export type * from './vat-orchestration.js'; /** * ({@link ZCF})-like tools for use in {@link OrchestrationFlow}s. - * - * @interface */ -export type ZcfTools> = Pick< - ZCF, - 'atomicRearrange' | 'assertUniqueKeyword' -> & { - makeInvitation: ( - offerHandler: OfferHandler, A>, - description: string, - customDetails?: object, - proposalShape?: Pattern, - ) => Promise>; -}; +export interface ZcfTools { + assertUniqueKeyword: ZCF['assertUniqueKeyword']; + atomicRearrange: ZCF['atomicRearrange']; + makeInvitation: ZCF['makeInvitation']; +} diff --git a/packages/orchestration/src/utils/zcf-tools.js b/packages/orchestration/src/utils/zcf-tools.js index 113ff943c36c..d3843695f2e3 100644 --- a/packages/orchestration/src/utils/zcf-tools.js +++ b/packages/orchestration/src/utils/zcf-tools.js @@ -1,5 +1,5 @@ /** - * @import {HostInterface, HostOf} from '@agoric/async-flow'; + * @import {HostInterface} from '@agoric/async-flow'; * @import {VowTools} from '@agoric/vow'; * @import {ZcfTools} from '../types.js'; */ @@ -11,11 +11,10 @@ const HandlerShape = M.remotable('OfferHandler'); /** * @param {ZCF} zcf * @param {VowTools} vowTools + * @returns {HostInterface} */ -export const makeZcfTools = (zcf, vowTools) => { - /** @satisfies {HostInterface} */ - const zcfForFlows = harden({ - /** @type {HostOf} */ +export const makeZcfTools = (zcf, vowTools) => + harden({ makeInvitation(offerHandler, description, customDetails, proposalShape) { mustMatch(offerHandler, HandlerShape); return vowTools.watch( @@ -27,15 +26,10 @@ export const makeZcfTools = (zcf, vowTools) => { ), ); }, - /** @type {ZCF['atomicRearrange']} */ atomicRearrange(transfers) { zcf.atomicRearrange(transfers); }, - /** @type {ZCF['assertUniqueKeyword']} */ assertUniqueKeyword(keyword) { zcf.assertUniqueKeyword(keyword); }, }); - - return zcfForFlows; -};