Skip to content

Commit

Permalink
refactor: consistent types-ambient
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Apr 30, 2024
1 parent 9e53ee1 commit 6f94b6f
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 13 deletions.
6 changes: 3 additions & 3 deletions packages/zoe/exported.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// @jessie-check

import './src/contractFacet/types-ambient.js';
import './src/zoeService/types.js';
import './src/contractSupport/types.js';
import './src/zoeService/types-ambient.js';
import './src/contractSupport/types-ambient.js';
import './src/contracts/exported.js';
import './src/types.js';
import './src/types-ambient.js';
import './tools/types-ambient.js';
import '@agoric/notifier/exported.js';
import '@agoric/ertp/exported.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/zoe/src/contractSupport/ratio.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// <reference path="./types.js" />
/// <reference path="./types-ambient.js" />
import { q, Fail } from '@agoric/assert';
import { AmountMath } from '@agoric/ertp';
import { assertRecord } from '@endo/marshal';
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/zoe/src/zoeService/originalZoeSeat.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { deeplyFulfilled } from '@endo/marshal';
import { makePromiseKit } from '@endo/promise-kit';

import { satisfiesWant } from '../contractFacet/offerSafety.js';
import '../types.js';
import '../types-ambient.js';
import '../internal-types.js';
import {
AmountKeywordRecordShape,
Expand Down
File renamed without changes.
7 changes: 3 additions & 4 deletions packages/zoe/src/zoeService/utils.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { Callable } from '@agoric/internal/src/utils.js';
import type { VatUpgradeResults } from '@agoric/swingset-vat';
import type { Baggage } from '@agoric/swingset-liveslots';

import type { IssuerKeywordRecord, Payment } from './types.js';
import type { Issuer } from '@agoric/ertp/exported.js';

// XXX https://github.com/Agoric/agoric-sdk/issues/4565
type SourceBundle = Record<string, any>;
Expand Down Expand Up @@ -71,7 +70,7 @@ export type ContractOf<S> = StartParams<S> & StartResult<S>;

type StartContractInstance<C> = (
installation: Installation<C>,
issuerKeywordRecord?: IssuerKeywordRecord,
issuerKeywordRecord?: Record<string, Issuer<any>>,
terms?: object,
privateArgs?: object,
) => Promise<{
Expand Down Expand Up @@ -113,7 +112,7 @@ export type StartedInstanceKit<SF> = {
*/
export type StartInstance = <SF>(
installation: Installation<SF> | PromiseLike<Installation<SF>>,
issuerKeywordRecord?: IssuerKeywordRecord,
issuerKeywordRecord?: Record<Keyword, Issuer<any>>,
// 'brands' and 'issuers' need not be passed in; Zoe provides them as StandardTerms
terms?: Omit<StartParams<SF>['terms'], 'brands' | 'issuers'>,
privateArgs?: Parameters<SF>[1],
Expand Down
2 changes: 1 addition & 1 deletion packages/zoe/src/zoeService/zoeSeat.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { deeplyFulfilled } from '@endo/marshal';
import { makePromiseKit } from '@endo/promise-kit';

import { satisfiesWant } from '../contractFacet/offerSafety.js';
import '../types.js';
import '../types-ambient.js';
import '../internal-types.js';
import {
declareOldZoeSeatAdminKind,
Expand Down
2 changes: 1 addition & 1 deletion packages/zoe/test/unitTests/contractSupport/test-ratio.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import '../../../src/contractSupport/types.js';
import '../../../src/contractSupport/types-ambient.js';

import { makeIssuerKit, AmountMath } from '@agoric/ertp';
import {
Expand Down
4 changes: 2 additions & 2 deletions packages/zoe/typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"src/contractFacet/internal-types.js",
"src/contractFacet/types-ambient.d.ts",
"src/contractSupport/index.js",
"src/contractSupport/types.js",
"src/contractSupport/types-ambient.js",
"src/types.js",
"src/zoeService/types.js",
"src/zoeService/types-ambient.js",
"src/zoeService/utils.d.ts",
"src/zoeService/zoe.js",
"tools/internal-types.js",
Expand Down

0 comments on commit 6f94b6f

Please sign in to comment.