Skip to content

Commit

Permalink
fix(orchestrate): makeStateRecord type annotation
Browse files Browse the repository at this point in the history
error TS2741: Property 'account' is missing in type '{}' but required in type '{ account: OrchestrationAccount<any> | undefined; }'
  • Loading branch information
0xpatrickdev committed Jun 25, 2024
1 parent f409a8d commit 9bc7afb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/orchestration/src/examples/sendAnywhere.contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,16 @@ export const start = async (zcf, privateArgs, baggage) => {
vowTools,
});

/** @type {{ account: OrchestrationAccount<any> | undefined }} */
const contractState = makeStateRecord({ account: undefined });
const contractState = makeStateRecord(
/** @type {{ account: OrchestrationAccount<any> | undefined }} */ {
account: undefined,
},
);

/** @type {OfferHandler} */
const sendIt = orchestrate(
'sendIt',
{ zcf, agoricNamesTools, contractState },
// eslint-disable-next-line no-shadow -- this `zcf` is enclosed in a membrane
sendItFn,
);

Expand Down

0 comments on commit 9bc7afb

Please sign in to comment.