Skip to content

Commit

Permalink
build: export inter-protocol types
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Jul 12, 2023
1 parent c158ff1 commit 430568b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
6 changes: 6 additions & 0 deletions packages/inter-protocol/jsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": [
"./jsconfig.json",
"../../tsconfig-build-options.json"
]
}
2 changes: 2 additions & 0 deletions packages/inter-protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"build": "yarn build:bundles",
"build:bundles": "node ./scripts/build-bundles.js",
"build:add-STARS-proposal": "agoric run scripts/add-STARS.js",
"prepack": "tsc --build jsconfig.build.json",
"postpack": "git clean -f '*.d.ts*' src/types.js",
"test": "ava",
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
"test:xs": "exit 0",
Expand Down
15 changes: 8 additions & 7 deletions packages/inter-protocol/src/proposals/startPSM.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,14 @@ export const makeAnchorAsset = async (
}),
);

/** @type {{ creatorFacet: ERef<Mint<'nat'>>, publicFacet: ERef<Issuer<'nat'>> }} */
// @ts-expect-error cast
const { creatorFacet: mint, publicFacet: issuer } = await E(startUpgradable)({
installation: mintHolder,
label: keyword,
terms,
});
const { creatorFacet: mint, publicFacet: issuer } =
/** @type {{ creatorFacet: ERef<Mint<'nat'>>, publicFacet: ERef<Issuer<'nat'>> }} */ (
await E(startUpgradable)({
installation: mintHolder,
label: keyword,
terms,
})
);

const brand = await E(issuer).getBrand();
const kit = harden({ mint, issuer, brand });
Expand Down

0 comments on commit 430568b

Please sign in to comment.