Skip to content

Commit

Permalink
chore: fix some lint
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed May 6, 2023
1 parent ee73d1b commit d969dd8
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/agoric-cli/src/commands/reserve.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { outputActionAndHint } from '../lib/wallet.js';

/**
* @param {import('anylogger').Logger} _logger
* @param io
* @param {*} io
*/
export const makeReserveCommand = (_logger, io = {}) => {
const { stdout = process.stdout, stderr = process.stderr, now } = io;
Expand Down
2 changes: 1 addition & 1 deletion packages/agoric-cli/src/lib/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const asBoardRemote = x => {

/**
* Summarize the balances array as user-facing informative tuples
*
* @param {import('@agoric/smart-wallet/src/smartWallet').CurrentWalletRecord['purses']} purses
* @param {AssetDescriptor[]} assets
*/
Expand Down
1 change: 0 additions & 1 deletion packages/inter-protocol/src/price/fluxAggregatorKit.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ const priceDescriptionFromQuote = quote => quote.quoteAmount.value[0];
* @param {StorageNode} storageNode
* @param {() => PublishKit<any>} makeDurablePublishKit
* @param {import('@agoric/zoe/src/contractSupport/recorder.js').MakeRecorder} makeRecorder
* @returns a method to call once to create the prepared kit
*/
export const prepareFluxAggregatorKit = async (
baggage,
Expand Down
16 changes: 9 additions & 7 deletions packages/internal/src/callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ harden(isCallback);
/**
* Prepare an attenuator class whose methods can be redirected via callbacks.
*
* @template {{ [K in PropertyKey]: (this: any, ...args: unknown[]) => any}} Methods
* @template {PropertyKey} M
* @param {import('@agoric/zone').Zone} zone The zone in which to allocate attenuators.
* @param {(keyof Methods)[]} methodNames Methods to forward.
* @param {M[]} methodNames Methods to forward.
* @param {object} opts
* @param {InterfaceGuard} [opts.interfaceGuard] An interface guard for the
* new attenuator.
Expand All @@ -207,7 +207,8 @@ export const prepareAttenuator = (
) => {
/**
* @typedef {(this: any, ...args: unknown[]) => any} Method
* @typedef {{ [K in keyof Methods]?: Callback<any> | null}} Overrides
* @typedef {{ [K in M]?: Callback<any> | null}} Overrides
* @typedef {{ [K in M]: (this: any, ...args: unknown[]) => any }} Methods
*/
const methods = /** @type {Methods} */ (
fromEntries(
Expand Down Expand Up @@ -307,7 +308,6 @@ harden(prepareAttenuator);
/**
* Prepare an attenuator whose methodNames are derived from the interfaceGuard.
*
* @template {{ [K in PropertyKey]: (this: any, ...args: unknown[]) => any}} Methods
* @param {import('@agoric/zone').Zone} zone
* @param {InterfaceGuard} interfaceGuard
* @param {object} [opts]
Expand All @@ -316,8 +316,10 @@ harden(prepareAttenuator);
export const prepareGuardedAttenuator = (zone, interfaceGuard, opts = {}) => {
const { methodGuards } = interfaceGuard;
const methodNames = ownKeys(methodGuards);
return /** @type {AttenuatorMaker<Methods>} */ (
prepareAttenuator(zone, methodNames, { ...opts, interfaceGuard })
);
const makeAttenuator = prepareAttenuator(zone, methodNames, {
...opts,
interfaceGuard,
});
return /** @type {AttenuatorMaker<any>} */ (makeAttenuator);
};
harden(prepareGuardedAttenuator);
2 changes: 1 addition & 1 deletion packages/smart-wallet/src/walletFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const makeAssetRegistry = assetPublisher => {
* @typedef {import('@agoric/vats').NameHub} NameHub
*
* @typedef {{
* getAssetSubscription: () => ERef<Subscription<import('@agoric/vats/src/vat-bank').AssetDescriptor>>
* getAssetSubscription: () => ERef<AsyncIterable<import('@agoric/vats/src/vat-bank').AssetDescriptor>>
* }} AssetPublisher
*/

Expand Down
4 changes: 2 additions & 2 deletions packages/vats/src/vat-bank.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
import { assert, Fail } from '@agoric/assert';
import { assert } from '@agoric/assert';
import { AmountMath, AssetKind } from '@agoric/ertp';
import { E, Far } from '@endo/far';
import {
Expand Down Expand Up @@ -186,7 +186,7 @@ const prepareBankChannelHandler = zone =>
break;
}
default: {
// Fail`Unrecognized request ${obj && obj.type}`;
// Fail`Unrecognized request ${obj}`;
}
}
},
Expand Down
1 change: 0 additions & 1 deletion packages/vats/src/virtual-purse.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @ts-check
import { M } from '@agoric/store';
import { E } from '@endo/far';
import { makeNotifier } from '@agoric/notifier';
import { isPromise } from '@endo/promise-kit';

import {
Expand Down
1 change: 0 additions & 1 deletion packages/vats/test/test-clientBundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ test('connectFaucet produces payments', async t => {
return amt;
},
}),
// @ts-expect-error mock
getAssetSubscription: () => null,
}),
}),
Expand Down

0 comments on commit d969dd8

Please sign in to comment.