Skip to content

Commit

Permalink
chore(types): hack makeProvisionPoolKit
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Nov 24, 2024
1 parent 061f5d5 commit c6245e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions packages/inter-protocol/src/provisionPoolKit.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ const FIRST_LOWER_NEAR_KEYWORD = /^[a-z][a-zA-Z0-9_$]*$/;
* @import {Bank, BankManager} from '@agoric/vats/src/vat-bank.js'
*/

// XXX when inferred, error TS2742: cannot be named without a reference to '../../../node_modules/@endo/exo/src/get-interface.js'. This is likely not portable. A type annotation is necessary.
/**
* @typedef {{
* machine: any;
* helper: any;
* public: any;
* }} ProvisionPoolKit
*/

/**
* @typedef {import('@agoric/zoe/src/zoeService/utils.js').Instance<
* import('@agoric/inter-protocol/src/psm/psm.js').start
Expand Down Expand Up @@ -506,6 +515,7 @@ export const prepareProvisionPoolKit = (
* @param {object} opts
* @param {Brand<'nat'>} opts.poolBrand
* @param {ERef<StorageNode>} opts.storageNode
* @returns {Promise<ProvisionPoolKit>}
*/
const makeProvisionPoolKit = async ({ poolBrand, storageNode }) => {
const fundPurse = await E(poolBank).getPurse(poolBrand);
Expand Down
2 changes: 1 addition & 1 deletion packages/inter-protocol/test/psm/setupPsm.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export const setupPsm = async (
brand.produce.IST.resolve(istBrand);
issuer.produce.IST.resolve(istIssuer);

// @ts-expect-error mock
space.produce.provisionPoolStartResult.resolve({
// @ts-expect-error mock
creatorFacet: Far('dummy', {
initPSM: () => {
t.log('dummy provisionPool.initPSM');
Expand Down

0 comments on commit c6245e1

Please sign in to comment.