From 9694a374df2544b78138078de90bf53641fe537c Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 26 Apr 2024 12:12:16 -0700 Subject: [PATCH] chore(types): adapt to new coverage --- packages/agoric-cli/src/lib/format.js | 2 ++ packages/solo/src/pipe-entrypoint.js | 1 + packages/solo/src/pipe.js | 1 + packages/vat-data/src/vat-data-bindings.js | 4 ++-- packages/vats/test/test-bootstrapPayment.js | 1 - packages/zoe/src/contractSupport/priceAuthorityTransform.js | 2 +- packages/zoe/tools/types-ambient.js | 2 +- 7 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/agoric-cli/src/lib/format.js b/packages/agoric-cli/src/lib/format.js index cad70a023dc2..9e50c4d6e33e 100644 --- a/packages/agoric-cli/src/lib/format.js +++ b/packages/agoric-cli/src/lib/format.js @@ -54,7 +54,9 @@ export const makeAmountFormatter = assets => amt => { return [issuerName, Number(value) / 10 ** decimalPlaces]; case 'set': assert(Array.isArray(value)); + // @ts-expect-error narrowed if (value[0]?.handle?.iface?.includes('InvitationHandle')) { + // @ts-expect-error narrowed return [issuerName, value.map(v => v.description)]; } return [issuerName, value]; diff --git a/packages/solo/src/pipe-entrypoint.js b/packages/solo/src/pipe-entrypoint.js index 0914ccfa36eb..81781f78f9da 100644 --- a/packages/solo/src/pipe-entrypoint.js +++ b/packages/solo/src/pipe-entrypoint.js @@ -29,6 +29,7 @@ const main = async () => { mutex.resolve(undefined); return; } + /** @type {any} */ const as = parse(`${msg}`); deliverator(...as).then(() => send('go')); }); diff --git a/packages/solo/src/pipe.js b/packages/solo/src/pipe.js index 4a743e4144e1..ade11381e697 100644 --- a/packages/solo/src/pipe.js +++ b/packages/solo/src/pipe.js @@ -31,6 +31,7 @@ export const connectToPipe = async ({ method, args, deliverInboundToMbx }) => { return; } // console.log('pipe.js', msg); + /** @type {any} */ const as = parse(`${msg}`); deliverInboundToMbx(...as).then(() => cp.send('go')); }); diff --git a/packages/vat-data/src/vat-data-bindings.js b/packages/vat-data/src/vat-data-bindings.js index a24f4c525bfa..11857763bdbb 100644 --- a/packages/vat-data/src/vat-data-bindings.js +++ b/packages/vat-data/src/vat-data-bindings.js @@ -9,8 +9,8 @@ import { provideLazy } from '@agoric/store'; let VatDataGlobal; if ('VatData' in globalThis) { globalThis.VatData || Fail`VatData defined in global as null or undefined`; - // @ts-expect-error XXX - VatDataGlobal = globalThis.VatData; + // XXX types incompatibility + VatDataGlobal = /** @type {any} */ (globalThis.VatData); } else { // XXX this module has been known to get imported (transitively) in cases that // never use it so we make a version that will satisfy module resolution but diff --git a/packages/vats/test/test-bootstrapPayment.js b/packages/vats/test/test-bootstrapPayment.js index 7a79d986e194..e3555282816a 100644 --- a/packages/vats/test/test-bootstrapPayment.js +++ b/packages/vats/test/test-bootstrapPayment.js @@ -44,7 +44,6 @@ test.before(async (/** @type {CentralSupplyTestContext} */ t) => { }; t.context = await deeplyFulfilled( - // @ts-expect-error XXX harden({ zoe, feeMintAccess: feeMintAccessP, diff --git a/packages/zoe/src/contractSupport/priceAuthorityTransform.js b/packages/zoe/src/contractSupport/priceAuthorityTransform.js index 2fc0c726e98a..b0968cafc62b 100644 --- a/packages/zoe/src/contractSupport/priceAuthorityTransform.js +++ b/packages/zoe/src/contractSupport/priceAuthorityTransform.js @@ -11,7 +11,7 @@ import { makeNotifier } from '@agoric/notifier'; * @param {Amount<'nat'>} amountIn * @param {Amount<'nat'>} amountOut * @param {import('@agoric/time').TimerService} timer - * @param {import('@agoric/time').Timestamp} timestamp + * @param {import('@agoric/time').TimestampRecord} timestamp * @param {ERef>} quoteMint * @returns {Promise} */ diff --git a/packages/zoe/tools/types-ambient.js b/packages/zoe/tools/types-ambient.js index 59129b87f191..7515e76743c9 100644 --- a/packages/zoe/tools/types-ambient.js +++ b/packages/zoe/tools/types-ambient.js @@ -23,7 +23,7 @@ * The quoted result of trading `amountIn` * @property {import('@endo/pass-style').RemotableObject & import('@agoric/time').TimerService} timer * The service that gave the `timestamp` - * @property {import('@agoric/time').Timestamp} timestamp + * @property {import('@agoric/time').TimestampRecord} timestamp * A timestamp according to `timer` for the quote * @property {any} [conditions] * Additional conditions for the quote