Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"@jessie.js/eslint-plugin": "^0.4.0",
"@types/express": "^4.17.17",
"@types/node": "^16.13.0",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"ava": "^5.3.0",
"c8": "^7.13.0",
"conventional-changelog-conventionalcommits": "^4.6.0",
Expand All @@ -30,7 +30,7 @@
"lerna": "^3.22.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.3",
"typescript": "~4.7.4"
"typescript": "~5.1.6"
},
"engines": {
"node": "^16.13 || ^18.12"
Expand Down
6 changes: 5 additions & 1 deletion packages/agoric-cli/src/commands/auction.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import { outputActionAndHint } from '../lib/wallet.js';
const { Fail } = assert;

/** @typedef {import('@agoric/governance/src/contractGovernance/typedParamManager.js').ParamTypesMap} ParamTypesMap */
/** @template M @typedef {import('@agoric/governance/src/contractGovernance/typedParamManager.js').ParamTypesMapFromRecord<M>} ParamTypesMapFromRecord */

/**
* @template {ParamStateRecord} M
* @typedef {import('@agoric/governance/src/contractGovernance/typedParamManager.js').ParamTypesMapFromRecord<M>} ParamTypesMapFromRecord
*/

/**
* @template {ParamTypesMap} M
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"peerDependencies": {
"@endo/eslint-plugin": "^0.4.4",
"@jessie.js/eslint-plugin": "^0.4.0",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"eslint": "^8.36.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-github": "^4.8.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/governance/src/contractHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const publicMixinAPI = harden({

/**
* @param {ZCF<GovernanceTerms<{}> & {}>} zcf
* @param {import('./contractGovernance/typedParamManager').TypedParamManager<unknown>} paramManager
* @param {import('./contractGovernance/typedParamManager').TypedParamManager<any>} paramManager
*/
export const validateElectorate = (zcf, paramManager) => {
const { governedParams } = zcf.getTerms();
Expand All @@ -53,7 +53,7 @@ harden(validateElectorate);
/**
* Utility function for `makeParamGovernance`.
*
* @template T
* @template {import('./contractGovernance/typedParamManager.js').ParamTypesMap} T
* @param {ZCF<GovernanceTerms<{}> & {}>} zcf
* @param {import('./contractGovernance/typedParamManager').TypedParamManager<T>} paramManager
*/
Expand Down
10 changes: 5 additions & 5 deletions packages/inter-protocol/scripts/init-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ const installKeyGroups = {
};

/**
* @template I
* @template R
* @param {object} opts
* @param {(i: I) => R} opts.publishRef
* @param {(m: string, b: string, opts?: any) => I} opts.install
* @param {<T>(f: T) => T} [opts.wrapInstall]
*
* @param {object} [options]
* @param {{ committeeName?: string, committeeSize?: number}} [options.econCommitteeOptions]
* @template I
* @template R
*/
export const committeeProposalBuilder = async (
{ publishRef, install: install0, wrapInstall },
Expand Down Expand Up @@ -83,13 +83,13 @@ export const committeeProposalBuilder = async (
};

/**
* @template I
* @template R
*
* @param {object} opts
* @param {(i: I) => R} opts.publishRef
* @param {(m: string, b: string, opts?: any) => I} opts.install
* @param {<T>(f: T) => T} [opts.wrapInstall]
*
* @template I
* @template R
*/
export const mainProposalBuilder = async ({
publishRef,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const sanitizePathSegment = name => {

/**
* @param {import('./econ-behaviors').EconomyBootstrapPowers} powers
* @param {object} [config]
* @param {object} config
* @param {object} [config.options]
* @param {EconCommitteeOptions} [config.options.econCommitteeOptions]
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/inter-protocol/src/proposals/startPSM.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ harden(startPSM);
* TODO: address redundancy with publishInterchainAssetFromBank
*
* @param {EconomyBootstrapPowers & WellKnownSpaces & ChainStorageVatParams} powers
* @param {{options?: { anchorOptions?: AnchorOptions } }} [config]
* @param {{options: { anchorOptions?: AnchorOptions } }} config
*/
export const makeAnchorAsset = async (
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const buildRootObject = async () => {
*/
const installations = {};

// @ts-expect-error TODO make fluxAggregator publicFacet support all governance methods (or pare down governance API)
/** @type {import('@agoric/governance/tools/puppetContractGovernor').PuppetContractGovernorKit<import('../../../src/price/fluxAggregatorContract.js').prepare>} */
let governorFacets;
/** @type {ReturnType<Awaited<ReturnType<import('../../../src/price/fluxAggregatorContract.js').prepare>>['creatorFacet']['getLimitedCreatorFacet']>} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const defaultParamValues = debtBrand =>
* @param {Array<NatValue> | Ratio} priceOrList
* @param {RelativeTime} quoteInterval
* @param {Amount | undefined} unitAmountIn
* @param {Partial<import('../../src/auction/params.js').AuctionParams>} [actionParamArgs]
* @param {Partial<import('../../src/auction/params.js').AuctionParams>} actionParamArgs
*/
export const setupElectorateReserveAndAuction = async (
t,
Expand Down
2 changes: 1 addition & 1 deletion packages/vats/src/core/lib-boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { makePromiseSpace } from './promise-space.js';
const { Fail, quote: q } = assert;

/**
* @typedef {true | string | { [key: string]: BootstrapManifestPermit }} BootstrapManifestPermit
* @typedef {true | string | { [key: string]: BootstrapManifestPermit | undefined }} BootstrapManifestPermit
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/vats/src/core/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@
*/

/**
* @template T
* @typedef {object} Producer<T>
* @property {(v: ERef<T>) => void} resolve
* @property {(r: unknown) => void} reject
* @property {(reason?: unknown) => void} reset
* @template T
*/
/**
* @typedef {{ bundleName?: string, bundleID?: string }} VatSourceRef
*/
/**
* @typedef {(name: string, sourceRef?: VatSourceRef) => T} VatLoader<T>
* @template T
* @typedef {(name: string, sourceRef?: VatSourceRef) => T} VatLoader<T>
*/

/**
Expand Down
1 change: 0 additions & 1 deletion packages/vats/src/proposals/restart-vats-proposal.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export const restartVats = async ({ consume }, { options }) => {
// TODO document that privateArgs cannot contain promises
// TODO try making all the contract starts take resolved values
const privateArgs = await deeplyFulfilledObject(
// @ts-expect-error cast
harden(instancePrivateArgs.get(instance) || {}),
);

Expand Down
1 change: 1 addition & 0 deletions packages/xsnap-lockdown/test/test-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ test('unconfined inspect', async t => {
const [toEval, toRender] = Array.isArray(testCase)
? testCase
: [testCase, testCase];
// @ts-expect-error Left side of comma operator is unused and has no side effects.
// eslint-disable-next-line no-eval
const evaled = (1, eval)(`(${toEval})`);
// t.log(evaled);
Expand Down
1 change: 1 addition & 0 deletions packages/xsnap/test/test-xs-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ test('round-trip byte sequences via JSON including string literals', async t =>
.fill(0)
.map((_, i) => `\\x${i.toString(16).padStart(2, '0')}`)
.join('');
// @ts-expect-error Left side of comma operator is unused and has no side effects.
// eslint-disable-next-line no-eval
const bstring2 = (1, eval)(`"${joctets}"`);
send(bstring1 === bstring2);
Expand Down
2 changes: 1 addition & 1 deletion packages/zoe/src/contractFacet/internal-types.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @jessie-check

/**
* @typedef {( {zcf: ZCF} ) => void} TestJigSetter
* @typedef {( {zcf}: {zcf: ZCF} ) => void} TestJigSetter
*/

/**
Expand Down
1 change: 1 addition & 0 deletions packages/zoe/src/contracts/autoswap.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ const start = async zcf => {
} = swapSeat.getProposal();

assert(isNatValue(wantedAmountOut.value));
assert.typeof(amountIn.value, 'bigint');

const tradePrice = getOutputPrice(
wantedAmountOut.value,
Expand Down
Loading