Skip to content

Commit

Permalink
chore(swingset-liveslots): export TypeScript definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
sirtimid committed Jan 21, 2025
1 parent b1998a7 commit e51d7b0
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 14 deletions.
6 changes: 5 additions & 1 deletion packages/swingset-liveslots/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "SwingSet ocap support layer",
"type": "module",
"main": "src/index.js",
"types": "src/ts-types.d.ts",
"engines": {
"node": "^18.12 || ^20.9"
},
Expand All @@ -14,7 +15,9 @@
"lint-fix": "yarn lint:eslint --fix",
"lint": "run-s --continue-on-error lint:*",
"lint:types": "tsc",
"lint:eslint": "eslint ."
"lint:eslint": "eslint .",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'"
},
"dependencies": {
"@endo/errors": "^1.2.8",
Expand All @@ -38,6 +41,7 @@
"files": [
"src/**/*.js",
"src/**/*.d.ts",
"src/**/*.map",
"test/**/*.js",
"tools",
"exported.js"
Expand Down
3 changes: 0 additions & 3 deletions packages/swingset-liveslots/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// <reference types="@agoric/store/exported.js" />

/* eslint-disable import/export -- types files have no named runtime exports */
export { makeLiveSlots, makeMarshaller } from './liveslots.js';

export {
Expand All @@ -10,5 +9,3 @@ export {
insistVatSyscallObject,
insistVatSyscallResult,
} from './message.js';

export * from './types-index.js';
6 changes: 6 additions & 0 deletions packages/swingset-liveslots/src/ts-types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export * from './index.js';

// Export any additional type this package provides
// eslint-disable-next-line import/export
export type * from './types.js';
export type * from './vatDataTypes.ts';
4 changes: 0 additions & 4 deletions packages/swingset-liveslots/src/types-index.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/swingset-liveslots/src/types-index.js

This file was deleted.

4 changes: 0 additions & 4 deletions packages/swingset-liveslots/src/types.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Ensure this is a module.
export {};

/**
* @callback makeLiveSlots
*/

/**
* The MeterControl object gives liveslots a mechanism to disable metering for certain GC-sensitive
* regions of code. Only the XS worker can actually do metering, but we track the enabled/disabled
Expand Down
10 changes: 10 additions & 0 deletions packages/swingset-liveslots/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": [
"./tsconfig.json",
"../../tsconfig-build-options.json"
],
"exclude": [
"./tools",
"./test"
]
}
2 changes: 2 additions & 0 deletions packages/swingset-liveslots/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"*.js",
"scripts/**/*.js",
"src/**/*.js",
"src/**/*.ts",
"src/**/*.d.ts",
"test/**/*.js",
"tools/**/*.js",
],
Expand Down

0 comments on commit e51d7b0

Please sign in to comment.