Skip to content

Commit

Permalink
refactor(types): references for ambients
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed May 16, 2024
1 parent b2306a8 commit c6c0a39
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 27 deletions.
1 change: 1 addition & 0 deletions packages/ERTP/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @jessie-check
/// <reference types="@agoric/internal/exported" />

export * from './amountMath.js';
export * from './issuerKit.js';
Expand Down
4 changes: 1 addition & 3 deletions packages/cache/src/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// @jessie-check

// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512
import '@agoric/internal/exported.js';
/// <reference types="@agoric/internal/exported" />

// eslint-disable-next-line import/export
export * from './types.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/casting/src/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @jessie-check

import '@agoric/internal/exported.js';
/// <reference types="@agoric/internal/exported" />

// eslint-disable-next-line import/export
export * from './types.js'; // no named exports
Expand Down
6 changes: 2 additions & 4 deletions packages/governance/src/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/// <reference types="@agoric/internal/exported" />
/// <reference types="@agoric/ertp/exported" />
// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512
import '@agoric/internal/exported.js';
import '@agoric/ertp/exported.js';
import '@agoric/zoe/exported.js';

/// <reference path="./types-ambient.js" />

export {
ChoiceMethod,
ElectionType,
Expand Down
5 changes: 3 additions & 2 deletions packages/inter-protocol/src/auction/auctionBook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/// <reference types="@agoric/internal/exported" />
/// <reference types="@agoric/governance/exported" />

// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512
import '@agoric/internal/exported.js';
import '@agoric/governance/exported.js';
import '@agoric/zoe/exported.js';
import '@agoric/zoe/src/contracts/exported.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/inter-protocol/src/auction/auctioneer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@agoric/governance/exported.js';
/// <reference types="@agoric/governance/exported" />
import '@agoric/zoe/exported.js';
import '@agoric/zoe/src/contracts/exported.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/inter-protocol/src/econCommitteeCharter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @jessie-check
/// <reference types="@agoric/governance/exported" />

import '@agoric/governance/exported.js';
import { M, mustMatch } from '@agoric/store';
import { TimestampShape } from '@agoric/time';
import { prepareExo, provideDurableMapStore } from '@agoric/vat-data';
Expand Down
1 change: 1 addition & 0 deletions packages/inter-protocol/src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @jessie-check
/// <reference types="@agoric/vats/src/core/types-ambient" />

export { calculateCurrentDebt } from './interest-math.js';
2 changes: 1 addition & 1 deletion packages/inter-protocol/src/psm/psm.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @jessie-check
/// <reference types="@agoric/governance/exported" />

// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512
import '@agoric/governance/exported.js';
import '@agoric/zoe/exported.js';
import '@agoric/zoe/src/contracts/exported.js';

Expand Down
3 changes: 1 addition & 2 deletions packages/inter-protocol/src/vaultFactory/vaultDirector.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/// <reference types="@agoric/governance/exported" />
import '@agoric/zoe/exported.js';
import '@agoric/zoe/src/contracts/exported.js';

import '@agoric/governance/exported.js';

import { AmountMath, AmountShape, BrandShape, IssuerShape } from '@agoric/ertp';
import {
GovernorFacetShape,
Expand Down
2 changes: 1 addition & 1 deletion packages/inter-protocol/src/vaultFactory/vaultFactory.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @jessie-check
/// <reference types="@agoric/governance/exported" />

// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512
import '@agoric/governance/exported.js';
import '@agoric/zoe/exported.js';
import '@agoric/zoe/src/contracts/exported.js';

Expand Down
4 changes: 1 addition & 3 deletions packages/notifier/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// @jessie-check

// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512
import '@agoric/internal/exported.js';
/// <reference types="@agoric/internal/exported" />

export {
makePublishKit,
Expand Down
6 changes: 6 additions & 0 deletions packages/orchestration/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/// <reference types="@agoric/internal/exported" />
/// <reference types="@agoric/vats/src/core/types-ambient" />

// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512
import '@agoric/zoe/exported.js';

export * from './src/types.js';
export * from './src/service.js';
export * from './src/typeGuards.js';
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// @ts-check
/// <reference types="@agoric/vats/src/core/types-ambient" />

import { E } from '@endo/far';
import { makeStorageNodeChild } from '@agoric/internal/src/lib-chainStorage.js';

// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512
import '@agoric/vats/src/core/types-ambient.js';

/**
* @param {BootstrapPowers & ChainBootstrapSpace} powers
* @param {object} options
Expand Down
2 changes: 1 addition & 1 deletion packages/vats/src/core/core-eval-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @file typesdef for the CoreEval environment
*
* To use add this to the top of the proposal
* To use add this to the top of the proposal:
*
* /// <reference types="@agoric/vats/src/core/core-eval-env" />
*
Expand Down
6 changes: 2 additions & 4 deletions packages/zoe/src/zoeService/zoe.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* validate that.
*/

/// <reference types="@agoric/internal/exported" />
/// <reference types="@agoric/notifier/exported.js" />
/// <reference path="../internal-types.js" />

import { E } from '@endo/eventual-send';
Expand All @@ -26,10 +28,6 @@ import { getZcfBundleCap } from './createZCFVat.js';
import { defaultFeeIssuerConfig, prepareFeeMint } from './feeMint.js';
import { ZoeServiceI } from '../typeGuards.js';

// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512
import '@agoric/internal/exported.js';
import '@agoric/notifier/exported.js';

/** @import {Baggage} from '@agoric/vat-data' */

const { Fail } = assert;
Expand Down

0 comments on commit c6c0a39

Please sign in to comment.