Skip to content

Commit

Permalink
type(liveslots-tools): missing types for strict test env helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
mhofman committed Oct 1, 2024
1 parent 7b411d4 commit 37bd361
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/swingset-liveslots/tools/prepare-strict-test-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export { flushIncarnation };
export { eventLoopIteration as nextCrank };

/**
* @import { PromiseKit } from '@endo/promise-kit'
* @import { Baggage } from '@agoric/swingset-liveslots'
* @import { ReincarnateOptions } from './setup-vat-data.js'
*/

Expand All @@ -37,6 +39,7 @@ export const annihilate = (options = {}) => {
return incarnation;
};

/** @returns {Baggage} */
export const getBaggage = () => {
return incarnation.fakeVomKit.cm.provideBaggage();
};
Expand All @@ -51,7 +54,7 @@ export const nextLife = (fromIncarnation = incarnation) => {
};

/**
* @template {(baggage: import('@agoric/swingset-liveslots').Baggage) => Promise<any> | any} B
* @template {(baggage: Baggage) => Promise<any> | any} B
* @param {B} build
* @param {(tools: Awaited<ReturnType<B>>) => Promise<void> | void} [run]
* @param {object} [options]
Expand All @@ -72,7 +75,7 @@ export const startLife = async (
oldIncarnationNumber,
);
const { fakeVomKit } = nextLife(fromIncarnation);
/** @type {Map<string, import('@endo/promise-kit').PromiseKit<any>>} */
/** @type {Map<string, PromiseKit<any>>} */
const previouslyWatchedPromises = new Map();
let buildTools;
try {
Expand Down

0 comments on commit 37bd361

Please sign in to comment.