Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

complete transition to types-index #10175

Merged
merged 6 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/SwingSet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@
"access": "public"
},
"typeCoverage": {
"atLeast": 75.81
"atLeast": 75.82
}
}
2 changes: 1 addition & 1 deletion packages/async-flow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@
"workerThreads": false
},
"typeCoverage": {
"atLeast": 77.29
"atLeast": 76.93
}
}
3 changes: 0 additions & 3 deletions packages/async-flow/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// This file can contain .js-specific Typescript compiler config.
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"maxNodeModuleJsDepth": 2,
},
"include": [
"*.js",
"scripts",
Expand Down
2 changes: 1 addition & 1 deletion packages/boot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@
"workerThreads": false
},
"typeCoverage": {
"atLeast": 90.31
"atLeast": 90.38
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck FIXME https://github.com/Agoric/agoric-sdk/issues/10176
import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js';
import type { TestFn } from 'ava';

Expand Down
2 changes: 1 addition & 1 deletion packages/builders/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@
"workerThreads": false
},
"typeCoverage": {
"atLeast": 81.8
"atLeast": 82.43
}
}
2 changes: 1 addition & 1 deletion packages/casting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@
"workerThreads": false
},
"typeCoverage": {
"atLeast": 88.92
"atLeast": 88.9
}
}
2 changes: 1 addition & 1 deletion packages/deployment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"readline-transform": "^1.0.0"
},
"typeCoverage": {
"atLeast": 50.87
"atLeast": 50.83
}
}
2 changes: 1 addition & 1 deletion packages/notifier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@
"timeout": "2m"
},
"typeCoverage": {
"atLeast": 90.33
"atLeast": 90.71
}
}
2 changes: 1 addition & 1 deletion packages/orchestration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@
"access": "public"
},
"typeCoverage": {
"atLeast": 97.6
"atLeast": 97.3
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @import {ContinuingOfferResult, InvitationMakers} from '@agoric/smart-wallet/src/types.js';
* @import {MakeCombineInvitationMakers} from '../exos/combine-invitation-makers.js';
* @import {CosmosOrchestrationAccount} from '../exos/cosmos-orchestration-account.js';
* @import {ZoeTools} from '../utils/zoe-tools.js';
* @import {ResolvedContinuingOfferResult, ZoeTools} from '../utils/zoe-tools.js';
*/

import { mustMatch } from '@endo/patterns';
Expand All @@ -23,15 +23,14 @@ const trace = makeTracer('StakingCombinationsFlows');
* }} ctx
* @param {ZCFSeat} _seat
* @param {{ chainName: string }} offerArgs
* @returns {Promise<ContinuingOfferResult>}
* @returns {Promise<ResolvedContinuingOfferResult>}
*/
export const makeAccount = async (orch, ctx, _seat, { chainName }) => {
const chain = await orch.getChain(chainName);
const account = await chain.makeAccount();

const extraMakers = ctx.makeExtraInvitationMaker(account);

/** @type {ContinuingOfferResult} */
const result = await account.asContinuingOffer();

return {
Expand Down
Empty file.
1 change: 1 addition & 0 deletions packages/smart-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.5.3",
"description": "Wallet contract",
"type": "module",
"main": "src/index.js",
"scripts": {
"build": "yarn build:bundles",
"build:bundles": "node ./scripts/build-bundles.js",
Expand Down
2 changes: 2 additions & 0 deletions packages/smart-wallet/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line import/export
export * from './types-index.js'; // no named exports
2 changes: 2 additions & 0 deletions packages/smart-wallet/src/types-index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Export all the types this package provides
export * from './types.js';
2 changes: 2 additions & 0 deletions packages/smart-wallet/src/types-index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Empty JS file to correspond with its .d.ts twin
export {};
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@
* Downside is it can't reference any ambient types, which most of agoric-sdk type are presently.
*/

import type { ERef } from '@endo/far';
import type { CapData } from '@endo/marshal';
import type { agoric } from '@agoric/cosmic-proto';
import type { agoric } from '@agoric/cosmic-proto/agoric/bundle.js';
import type { AgoricNamesRemotes } from '@agoric/vats/tools/board-utils.js';
import type { StoredFacet } from '@agoric/internal/src/lib-chainStorage.js';
import type { PublicTopic } from '@agoric/zoe/src/contractSupport/topics.js';
import type { OfferSpec } from './offers.js';

Expand All @@ -28,7 +25,7 @@ export type InvitationMakers = Record<
(...args: any[]) => Promise<Invitation>
>;

export type PublicSubscribers = Record<string, PublicTopic>;
export type PublicSubscribers = Record<string, PublicTopic<unknown>>;

export interface ContinuingOfferResult {
invitationMakers: InvitationMakers;
Expand Down
1 change: 1 addition & 0 deletions packages/smart-wallet/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export const objectMapStoragePath = subscribers => {
}
return deeplyFulfilledObject(
objectMap(subscribers, sub =>
// @ts-expect-error backwards compat
'subscriber' in sub ? sub.storagePath : E(sub).getPath(),
),
);
Expand Down
2 changes: 1 addition & 1 deletion packages/solo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@
"workerThreads": false
},
"typeCoverage": {
"atLeast": 73.55
"atLeast": 73.54
}
}
2 changes: 1 addition & 1 deletion packages/swing-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
"timeout": "2m"
},
"typeCoverage": {
"atLeast": 79.02
"atLeast": 79.08
}
}
2 changes: 1 addition & 1 deletion packages/swing-store/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export { makeSnapStore } from './snapStore.js';
export { makeSnapStoreIO } from './snapStoreIO.js';

// eslint-disable-next-line import/export
export * from './types.js';
export * from './types-index.js';
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Types for the public API

// Everything this "exports" actually comes from the neighboring types.d.ts file
// Everything this "exports" actually comes from the neighboring .d.ts twin

// Ensure this is a module.
export {};
2 changes: 1 addition & 1 deletion packages/swingset-liveslots/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@
"access": "public"
},
"typeCoverage": {
"atLeast": 75.1
"atLeast": 75.24
}
}
2 changes: 1 addition & 1 deletion packages/vats/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@
"workerThreads": false
},
"typeCoverage": {
"atLeast": 91.51
"atLeast": 91.5
}
}
4 changes: 2 additions & 2 deletions packages/vats/src/core/types-ambient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ type StartedInstanceKitWithLabel = {
type ChainBootstrapSpaceT = {
agoricNames: import('../types.js').NameHub;
agoricNamesAdmin: import('@agoric/vats').NameAdmin;
bankManager: BankManager;
bankManager: import('@agoric/vats/src/vat-bank.js').BankManager;
bldIssuerKit: RemoteIssuerKit;
board: import('@agoric/vats').Board;
bridgeManager: import('../types.js').BridgeManager | undefined;
Expand Down Expand Up @@ -371,7 +371,7 @@ type ChainBootstrapSpaceT = {
namesByAddress: import('../types.js').NameHub;
namesByAddressAdmin: import('../types.js').NamesByAddressAdmin;
networkVat: NetworkVat;
orchestration?: CosmosInterchainService;
orchestration?: import('@agoric/orchestration').CosmosInterchainService;
pegasusConnections: import('@agoric/vats').NameHubKit;
pegasusConnectionsAdmin: import('@agoric/vats').NameAdmin;
powerStore: MapStore;
Expand Down
2 changes: 1 addition & 1 deletion packages/vow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
"access": "public"
},
"typeCoverage": {
"atLeast": 89.96
"atLeast": 91.85
}
}
2 changes: 1 addition & 1 deletion packages/xsnap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@
"workerThreads": false
},
"typeCoverage": {
"atLeast": 94.04
"atLeast": 93.51
}
}
2 changes: 1 addition & 1 deletion packages/zone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
"workerThreads": false
},
"typeCoverage": {
"atLeast": 96.68
"atLeast": 96.58
}
}
Loading