Skip to content

Commit

Permalink
fix: tighten bindAllMethods caller types
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Mar 15, 2023
1 parent 372d222 commit f04c118
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/SwingSet/src/vats/timer/vat-timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ export const buildRootObject = (vatPowers, _vatParameters, baggage) => {
* replace the device), just in case that's useful someday
*
* @param {unknown} timerNode
* @returns {Promise<TimerService>}
* @returns {TimerService}
*/
const createTimerService = timerNode => {
timerDevice = timerNode;
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/tools/passableEncoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const noop = () => {};

// TODO define these somewhere more accessible. https://github.com/endojs/endo/issues/1488
/**
* @typedef {Promise | import('@agoric/internal').Remotable} PassByRef
* @typedef {import('@endo/eventual-send').FarRef<unknown>} PassByRef
* Gets transformed by a marshaller encoding.
* As opposed to pass-by-copy
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/zoe/tools/internal-types.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @typedef {object} ManualTimerAdmin
* @property {(msg?: string) => Promise<void>} tick
* @property {(msg?: string) => void | Promise<void>} tick
* @property {(nTimes: number, msg?: string) => Promise<void>} tickN
*/

Expand Down
5 changes: 2 additions & 3 deletions packages/zoe/tools/manualTimer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ const { Fail } = assert;
/**
* @typedef {{
* timeStep?: import('@agoric/time/src/types').RelativeTime,
* eventLoopIteration?: () => Promise<unknown>,
* eventLoopIteration?: () => void | Promise<void>,
* }} ZoeManualTimerOptions
*/

const nolog = (..._args) => {};

/**
*
* A fake TimerService, for unit tests that do not use a real
* kernel. You can make time pass by calling `advanceTo(when)`, or one
* `timeStep` at a time by calling `tick()`.
Expand Down Expand Up @@ -62,7 +61,7 @@ const nolog = (..._args) => {};
const buildManualTimer = (log = nolog, startValue = 0n, options = {}) => {
const {
timeStep = 1n,
eventLoopIteration = () => 0,
eventLoopIteration = () => {},
...buildOptions
} = options;
assert.typeof(timeStep, 'bigint');
Expand Down

0 comments on commit f04c118

Please sign in to comment.