diff --git a/packages/ERTP/package.json b/packages/ERTP/package.json index 1213cd9a937..ddd9d9497e8 100644 --- a/packages/ERTP/package.json +++ b/packages/ERTP/package.json @@ -17,7 +17,7 @@ "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", "lint:eslint": "eslint .", - "lint:types": "tsc --maxNodeModuleJsDepth 3 -p jsconfig.json" + "lint:types": "tsc -p jsconfig.json" }, "repository": { "type": "git", diff --git a/packages/SwingSet/package.json b/packages/SwingSet/package.json index 2e07041c964..c7210a32c46 100644 --- a/packages/SwingSet/package.json +++ b/packages/SwingSet/package.json @@ -17,7 +17,7 @@ "test:xs-worker": "ava test/workers/test-worker.js -m 'xs vat manager'", "lint-fix": "yarn lint:eslint --fix", "lint": "yarn lint:types&&yarn lint:eslint", - "lint:types": "tsc --maxNodeModuleJsDepth 3 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "devDependencies": { diff --git a/packages/SwingSet/src/controller/controller.js b/packages/SwingSet/src/controller/controller.js index 61a1b510147..b9c75bc4465 100644 --- a/packages/SwingSet/src/controller/controller.js +++ b/packages/SwingSet/src/controller/controller.js @@ -1,5 +1,6 @@ // @ts-check /* global globalThis, WeakRef, FinalizationRegistry */ +/* eslint-disable @typescript-eslint/prefer-ts-expect-error -- https://github.com/Agoric/agoric-sdk/issues/4620 */ import fs from 'fs'; import path from 'path'; @@ -287,9 +288,9 @@ export async function makeSwingsetController( } const bundles = [ - // @ts-expect-error assume lockdownBundle is set + // @ts-ignore assume lockdownBundle is set JSON.parse(kvStore.get('lockdownBundle')), - // @ts-expect-error assume supervisorBundle is set + // @ts-ignore assume supervisorBundle is set JSON.parse(kvStore.get('supervisorBundle')), ]; const startXSnap = makeStartXSnap(bundles, { diff --git a/packages/SwingSet/src/kernel/kernelSyscall.js b/packages/SwingSet/src/kernel/kernelSyscall.js index be38932f05d..c4f039b2630 100644 --- a/packages/SwingSet/src/kernel/kernelSyscall.js +++ b/packages/SwingSet/src/kernel/kernelSyscall.js @@ -1,4 +1,5 @@ // @ts-check +/* eslint-disable @typescript-eslint/prefer-ts-expect-error -- https://github.com/Agoric/agoric-sdk/issues/4620 */ import { assert, details as X } from '@agoric/assert'; import { insistKernelType } from './parseKernelSlots.js'; @@ -207,8 +208,10 @@ export function makeKernelSyscallHandler(tools) { workingLowerBound = actualLowerBound; workingUpperBound = actualUpperBound; workingKeyIterator = kvStore.getKeys(startKey, actualUpperBound); + // @ts-ignore some resolution thinks this is undefined nextIter = workingKeyIterator.next(); if (!nextIter.done && nextIter.value === actualPriorKey) { + // @ts-ignore some resolution thinks this is undefined nextIter = workingKeyIterator.next(); } } diff --git a/packages/SwingSet/src/kernel/state/kernelKeeper.js b/packages/SwingSet/src/kernel/state/kernelKeeper.js index 917c599c3a9..7aae837e6c1 100644 --- a/packages/SwingSet/src/kernel/state/kernelKeeper.js +++ b/packages/SwingSet/src/kernel/state/kernelKeeper.js @@ -1,4 +1,5 @@ // @ts-check +/* eslint-disable @typescript-eslint/prefer-ts-expect-error -- https://github.com/Agoric/agoric-sdk/issues/4620 */ import { Nat, isNat } from '@agoric/nat'; import { assert, details as X } from '@agoric/assert'; import { wrapStorage } from './storageWrapper.js'; @@ -199,7 +200,7 @@ export default function makeKernelKeeper( */ function getRequired(key) { assert(kvStore.has(key), X`storage lacks required key ${key}`); - // @ts-expect-error already checked .has() + // @ts-ignore already checked .has() return kvStore.get(key); } diff --git a/packages/cache/package.json b/packages/cache/package.json index 0db06556cd1..0a0cbdd0580 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -12,7 +12,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint --ext .js,.ts ." }, "keywords": [], diff --git a/packages/casting/package.json b/packages/casting/package.json index 95e9a632c52..569d6992db0 100644 --- a/packages/casting/package.json +++ b/packages/casting/package.json @@ -13,7 +13,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint --ext .js,.ts ." }, "keywords": [], diff --git a/packages/cosmic-swingset/package.json b/packages/cosmic-swingset/package.json index 46f1ab81bfe..29b886f240c 100644 --- a/packages/cosmic-swingset/package.json +++ b/packages/cosmic-swingset/package.json @@ -15,7 +15,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 3 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "keywords": [], diff --git a/packages/deploy-script-support/package.json b/packages/deploy-script-support/package.json index c11e111f468..34ddfb7edb5 100644 --- a/packages/deploy-script-support/package.json +++ b/packages/deploy-script-support/package.json @@ -13,7 +13,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint:eslint": "eslint .", - "lint:types": "tsc --maxNodeModuleJsDepth 5 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint": "run-s --continue-on-error lint:*" }, "repository": { diff --git a/packages/governance/package.json b/packages/governance/package.json index 2076b759640..cc019123964 100644 --- a/packages/governance/package.json +++ b/packages/governance/package.json @@ -16,7 +16,7 @@ "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", "lint:eslint": "eslint .", - "lint:types": "tsc --maxNodeModuleJsDepth 3 -p jsconfig.json" + "lint:types": "tsc -p jsconfig.json" }, "repository": { "type": "git", diff --git a/packages/inter-protocol/package.json b/packages/inter-protocol/package.json index ee8e7800177..62144c3f1fe 100644 --- a/packages/inter-protocol/package.json +++ b/packages/inter-protocol/package.json @@ -16,7 +16,7 @@ "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", "lint:eslint": "eslint .", - "lint:types": "tsc --maxNodeModuleJsDepth 5 -p jsconfig.json" + "lint:types": "tsc -p jsconfig.json" }, "repository": { "type": "git", diff --git a/packages/internal/src/config.js b/packages/internal/src/config.js index c3923390a10..044f18538af 100644 --- a/packages/internal/src/config.js +++ b/packages/internal/src/config.js @@ -2,8 +2,8 @@ /** @file * * Some of this config info may make more sense in a particular package. However - * due to the maxNodeModuleJsDepth hack and our general lax dependency graph, - * sometimes rational placements cause type resolution errors. + * due to https://github.com/Agoric/agoric-sdk/issues/4620 and our lax package + * dependency graph, sometimes rational placements cause type resolution errors. * * So as a work-around some constants that need access from more than one package are placed here. */ diff --git a/packages/notifier/package.json b/packages/notifier/package.json index 66885c38732..493c8d88d60 100644 --- a/packages/notifier/package.json +++ b/packages/notifier/package.json @@ -15,7 +15,7 @@ "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", "lint:eslint": "eslint .", - "lint:types": "tsc --maxNodeModuleJsDepth 3 -p jsconfig.json" + "lint:types": "tsc -p jsconfig.json" }, "repository": { "type": "git", diff --git a/packages/notifier/src/asyncIterableAdaptor.js b/packages/notifier/src/asyncIterableAdaptor.js index 1b5081c711f..9fd119ae24e 100644 --- a/packages/notifier/src/asyncIterableAdaptor.js +++ b/packages/notifier/src/asyncIterableAdaptor.js @@ -80,6 +80,8 @@ export const makeAsyncIterableFromNotifier = notifierP => { return harden({ value, done }); }); } + // xxx hint for type checker + assert(myIterationResultP); return myIterationResultP; }, }); diff --git a/packages/notifier/src/storesub.js b/packages/notifier/src/storesub.js index 75442f69480..46523f70904 100644 --- a/packages/notifier/src/storesub.js +++ b/packages/notifier/src/storesub.js @@ -136,7 +136,8 @@ export const makeStoredSubscription = ( } /** @type {StoredSubscription} */ - // @ts-expect-error getStoreKey invalid, deprecated type + // eslint-disable-next-line -- different per package https://github.com/Agoric/agoric-sdk/issues/4620 + // @ts-ignore getStoreKey type does not have `subscription` const storesub = Far('StoredSubscription', { getStoreKey: async () => { if (!storageNode) { diff --git a/packages/notifier/test/prepare-test-env-ava.js b/packages/notifier/test/prepare-test-env-ava.js index 892e975dbb6..9aa9db8e7cb 100644 --- a/packages/notifier/test/prepare-test-env-ava.js +++ b/packages/notifier/test/prepare-test-env-ava.js @@ -4,4 +4,6 @@ import '@endo/init'; import { wrapTest } from '@endo/ses-ava'; import rawTest from 'ava'; +// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error +// @ts-ignore -- https://github.com/endojs/endo/issues/1235 export const test = wrapTest(rawTest); diff --git a/packages/notifier/test/test-publish-kit.js b/packages/notifier/test/test-publish-kit.js index 67b503f9935..40742429c11 100644 --- a/packages/notifier/test/test-publish-kit.js +++ b/packages/notifier/test/test-publish-kit.js @@ -1,4 +1,5 @@ // @ts-check +/* eslint-disable @typescript-eslint/prefer-ts-expect-error -- https://github.com/Agoric/agoric-sdk/issues/4620 */ import { test } from './prepare-test-env-ava.js'; import { @@ -124,13 +125,13 @@ test('makePublishKit', async t => { 'failure should not be allowed after finalization', ); await t.throwsAsync( - // @ts-expect-error known to be promise version of PublicationList + // @ts-ignore known to be promise version of PublicationList subFinal.tail, undefined, 'tail promise of final result should be rejected', ); await t.throwsAsync( - // @ts-expect-error known to be promise version of PublicationList + // @ts-ignore known to be promise version of PublicationList subscriber.subscribeAfter(subFinal.publishCount), undefined, 'subscribeAfter(finalPublishCount) should be rejected', @@ -179,13 +180,13 @@ test('makePublishKit - immediate finish', async t => { 'failure should not be allowed after finalization', ); await t.throwsAsync( - // @ts-expect-error known to be promise version of PublicationList + // @ts-ignore known to be promise version of PublicationList subFinal.tail, undefined, 'tail promise of final result should be rejected', ); await t.throwsAsync( - // @ts-expect-error known to be promise version of PublicationList + // @ts-ignore known to be promise version of PublicationList subscriber.subscribeAfter(subFinal.publishCount), undefined, 'subscribeAfter(finalPublishCount) should be rejected', @@ -336,7 +337,7 @@ test('subscribeAfter bounds checking', async t => { const repr = typeof badCount === 'string' ? JSON.stringify(badCount) : badCount; t.throws( - // @ts-expect-error deliberate invalid arguments for testing + // @ts-ignore deliberate invalid arguments for testing () => subscriber.subscribeAfter(badCount), undefined, `subscribeAfter should reject invalid publish count: ${typeof badCount} ${repr}`, diff --git a/packages/pegasus/package.json b/packages/pegasus/package.json index 0903944ef1b..d8732d01549 100644 --- a/packages/pegasus/package.json +++ b/packages/pegasus/package.json @@ -16,7 +16,7 @@ "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", "lint:eslint": "eslint .", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json" + "lint:types": "tsc -p jsconfig.json" }, "repository": { "type": "git", diff --git a/packages/smart-wallet/package.json b/packages/smart-wallet/package.json index 18056dd7ba6..db9e8a229a5 100644 --- a/packages/smart-wallet/package.json +++ b/packages/smart-wallet/package.json @@ -10,7 +10,7 @@ "test:xs": "exit 0", "lint": "run-s --continue-on-error lint:*", "lint-fix": "yarn lint:eslint --fix", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "devDependencies": { @@ -19,7 +19,6 @@ "@agoric/deploy-script-support": "^0.9.4", "@agoric/inter-protocol": "^0.13.1", "@agoric/swingset-vat": "^0.30.2", - "@agoric/vats": "^0.11.0", "@agoric/wallet-backend": "^0.13.3", "@endo/captp": "^2.0.17", "@endo/init": "^0.5.51", diff --git a/packages/smart-wallet/src/smartWallet.js b/packages/smart-wallet/src/smartWallet.js index faadb540047..697a2eb7d81 100644 --- a/packages/smart-wallet/src/smartWallet.js +++ b/packages/smart-wallet/src/smartWallet.js @@ -462,7 +462,7 @@ const behavior = { self: { /** * - * @param {import('@endo/captp').CapData} actionCapData of type BridgeAction + * @param {import('@endo/marshal').CapData} actionCapData of type BridgeAction * @param {boolean} [canSpend=false] */ handleBridgeAction(actionCapData, canSpend = false) { diff --git a/packages/solo/package.json b/packages/solo/package.json index 259308709d8..0e5fe2b7c65 100644 --- a/packages/solo/package.json +++ b/packages/solo/package.json @@ -15,7 +15,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "keywords": [], diff --git a/packages/store/package.json b/packages/store/package.json index 3f098babf17..5abd7e769b6 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -13,7 +13,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 3 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "repository": { diff --git a/packages/store/src/patterns/interface-tools.js b/packages/store/src/patterns/interface-tools.js index e58ea45b47d..effdd3ab05a 100644 --- a/packages/store/src/patterns/interface-tools.js +++ b/packages/store/src/patterns/interface-tools.js @@ -364,7 +364,7 @@ export const defineHeapFarClassKit = ( const contextMapKit = objectMap(methodsKit, () => new WeakMap()); const prototypeKit = objectMap(methodsKit, (methods, facetName) => defendPrototype( - // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error -- different per package #4620 + // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error -- different per package https://github.com/Agoric/agoric-sdk/issues/4620 // @ts-ignore could be symbol `${tag} ${facetName}`, contextMapKit[facetName], @@ -394,7 +394,7 @@ export const defineHeapFarClassKit = ( } return facets; }; - // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error -- different per package #4620 + // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error -- different per package https://github.com/Agoric/agoric-sdk/issues/4620 // @ts-ignore xxx return harden(makeInstanceKit); }; diff --git a/packages/swing-store/package.json b/packages/swing-store/package.json index 2fbc2bdc8c9..9afe6b51be3 100644 --- a/packages/swing-store/package.json +++ b/packages/swing-store/package.json @@ -14,7 +14,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "dependencies": { diff --git a/packages/telemetry/package.json b/packages/telemetry/package.json index 8fcb5690369..e7e9640eb55 100644 --- a/packages/telemetry/package.json +++ b/packages/telemetry/package.json @@ -12,7 +12,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "bin": { diff --git a/packages/ui-components/package.json b/packages/ui-components/package.json index e63e3f8951b..9a3d1e11e78 100644 --- a/packages/ui-components/package.json +++ b/packages/ui-components/package.json @@ -27,7 +27,7 @@ "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", "lint:eslint": "eslint .", - "lint:types": "tsc --maxNodeModuleJsDepth 3 -p jsconfig.json" + "lint:types": "tsc -p jsconfig.json" }, "eslintConfig": { "extends": [ diff --git a/packages/vats/package.json b/packages/vats/package.json index dd961b8f210..85fb4581c7f 100644 --- a/packages/vats/package.json +++ b/packages/vats/package.json @@ -18,7 +18,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 5 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "keywords": [], diff --git a/packages/wallet/api/package.json b/packages/wallet/api/package.json index 97a250d4531..f518e59e084 100644 --- a/packages/wallet/api/package.json +++ b/packages/wallet/api/package.json @@ -10,7 +10,7 @@ "test:xs": "exit 0", "lint": "run-s --continue-on-error lint:*", "lint-fix": "yarn lint:eslint --fix", - "lint:types": "tsc --maxNodeModuleJsDepth 3 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "devDependencies": { diff --git a/packages/wallet/ui/endo-promise-kit.d.ts b/packages/wallet/ui/endo-promise-kit.d.ts deleted file mode 100644 index 4c846fd1c44..00000000000 --- a/packages/wallet/ui/endo-promise-kit.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -// XXX hack until https://github.com/Agoric/agoric-sdk/issues/4560 -// Generated from @agoric/ertp in a manual build -declare module '@endo/promise-kit' { - /** - * A reified Promise - */ - type PromiseKit = { - resolve: (value: ERef) => void; - reject: (reason: any) => void; - promise: Promise; - }; - /** - * PromiseRecord is deprecated in favor of PromiseKit. - */ - type PromiseRecord = PromiseKit; - /** - * A reference of some kind for to an object of type T. It may be a direct - * reference to a local T. It may be a local presence for a remote T. It may - * be a promise for a local or remote T. Or it may even be a thenable - * (a promise-like non-promise with a "then" method) for a T. - */ - type ERef = T | PromiseLike; - - /** - * Determine if the argument is a Promise. - * - * @param {unknown} maybePromise The value to examine - * @returns {maybePromise is Promise} Whether it is a promise - */ - function isPromise(maybePromise: unknown): maybePromise is Promise; - - /** - * makePromiseKit() builds a Promise object, and returns a record - * containing the promise itself, as well as separate facets for resolving - * and rejecting it. - * - * @template T - * @returns {import('./src/types.js').PromiseKit} - */ - function makePromiseKit(): PromiseKit; - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * - * Unlike `Promise.race` it cleans up after itself so a non-resolved value doesn't hold onto - * the result promise. - * - * @template T - * @param {Iterable} values An iterable of Promises. - * @returns {Promise>} A new Promise. - */ - function racePromises(values: Iterable): Promise>; -} diff --git a/packages/web-components/package.json b/packages/web-components/package.json index 7d1e929de0e..02aff64111a 100644 --- a/packages/web-components/package.json +++ b/packages/web-components/package.json @@ -14,7 +14,7 @@ "test:watch": "web-test-runner --watch", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint . --ignore-path .gitignore", "analyze": "cem analyze --litelement", "start": "web-dev-server --port 8100" diff --git a/packages/zoe/package.json b/packages/zoe/package.json index 904a73993ee..c0e5246b281 100644 --- a/packages/zoe/package.json +++ b/packages/zoe/package.json @@ -21,7 +21,7 @@ "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", "lint:eslint": "eslint .", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json" + "lint:types": "tsc -p jsconfig.json" }, "repository": { "type": "git", diff --git a/packages/zoe/src/contractSupport/priceAuthority.js b/packages/zoe/src/contractSupport/priceAuthority.js index ff7614f9124..28e27f52299 100644 --- a/packages/zoe/src/contractSupport/priceAuthority.js +++ b/packages/zoe/src/contractSupport/priceAuthority.js @@ -1,4 +1,5 @@ // @ts-check +/// import { E } from '@endo/eventual-send'; import { Far } from '@endo/marshal'; diff --git a/packages/zoe/src/contracts/priceAggregator.js b/packages/zoe/src/contracts/priceAggregator.js index 1faa799568a..8182ca58caf 100644 --- a/packages/zoe/src/contracts/priceAggregator.js +++ b/packages/zoe/src/contracts/priceAggregator.js @@ -1,4 +1,5 @@ // @ts-check +/// import { makeIssuerKit, AssetKind, AmountMath } from '@agoric/ertp'; import { E } from '@endo/eventual-send';