-
Notifications
You must be signed in to change notification settings - Fork 212
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
export types #6500
export types #6500
Changes from 25 commits
2f7d5f4
6775bdf
bc0aa42
d1119f4
c988316
434e7ae
e5f6c2d
3d3620d
ec7efa2
a39596e
9b7da70
ab322c2
4e2b987
10a6b2c
ffb5207
39ffa14
21ac961
472b820
3181a4f
ccc22fd
12597aa
7a1dcd5
be1ede5
12c7971
078263a
135bf05
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "./jsconfig.json", | ||
"compilerOptions": { | ||
"noEmit": false, | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"declarationMap": true | ||
}, | ||
"exclude": [ | ||
"test/" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
// This file can contain .js-specific Typescript compiler config. | ||
{ | ||
"compilerOptions": { | ||
"target": "esnext", | ||
"module": "esnext", | ||
|
||
"checkJs": true, | ||
"noEmit": true, | ||
/* | ||
// The following flags are for creating .d.ts files: | ||
"noEmit": false, | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
*/ | ||
"downlevelIteration": true, | ||
"strictNullChecks": true, | ||
"moduleResolution": "node", | ||
"types": [ | ||
"node" | ||
] | ||
}, | ||
"include": ["src/**/*.js", "test/**/*.js", "exported.js", "globals.d.ts"], | ||
"include": [ | ||
"*.js", | ||
"*.ts", | ||
"src/**/*.js", | ||
"src/**/*.ts" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// @ts-check | ||
|
||
import { passStyleOf, assertRemotable, assertRecord } from '@endo/marshal'; | ||
|
||
import './types.js'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// @ts-check | ||
|
||
import { assert, details as X } from '@agoric/assert'; | ||
import { fit } from '@agoric/store'; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// @ts-check | ||
|
||
export * from './amountMath.js'; | ||
export * from './issuerKit.js'; | ||
export * from './typeGuards.js'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// @ts-check | ||
// @jessie-check | ||
|
||
import { assert } from '@agoric/assert'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// @ts-check | ||
|
||
import { | ||
keyEQ, | ||
makeCopyBag, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// @ts-check | ||
|
||
import { | ||
keyEQ, | ||
makeCopySet, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// @ts-check | ||
|
||
import { Nat, isNat } from '@agoric/nat'; | ||
|
||
import '../types.js'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// @ts-check | ||
|
||
import { passStyleOf } from '@endo/marshal'; | ||
import { | ||
assertKey, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// @ts-check | ||
|
||
import { initEmpty } from '@agoric/store'; | ||
import { vivifyFarClass } from '@agoric/vat-data'; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// @ts-check | ||
|
||
import { Far } from '@endo/marshal'; | ||
import { | ||
makeScalarBigMapStore, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -351,7 +351,7 @@ export {}; | |
* | ||
* @typedef { string } BundleID | ||
* @typedef {*} BundleCap | ||
* @typedef { { moduleFormat: 'endoZipBase64', endoZipBase64: string, endoZipBase64Sha512 } } EndoZipBase64Bundle | ||
* @typedef { { moduleFormat: 'endoZipBase64', endoZipBase64: string, endoZipBase64Sha512: string } } EndoZipBase64Bundle | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh yeah that would do it! |
||
* | ||
* @typedef { unknown } Meter | ||
* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,9 +21,11 @@ const DEFAULT_WALKER = Far('walker', { walk: pluginRootP => pluginRootP }); | |
|
||
/** | ||
* @template T | ||
* @typedef {T} Device | ||
* @typedef {'Device' & { __deviceType__: T }} Device | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎉 |
||
*/ | ||
|
||
/** @typedef {<T>(target: Device<T>) => T} DProxy (approximately) */ | ||
|
||
/** | ||
* @callback LoadPlugin | ||
* @param {string} specifier | ||
|
@@ -49,18 +51,15 @@ const DEFAULT_WALKER = Far('walker', { walk: pluginRootP => pluginRootP }); | |
*/ | ||
|
||
/** | ||
* @typedef {object} PluginDevice | ||
* @property {(mod: string) => number} connect | ||
* @property {(receiver: Receiver) => void} registerReceiver | ||
* @property {(index: number, obj: Record<string, any>) => void} send | ||
* @property {() => string} getPluginDir | ||
* @typedef { Device<ReturnType<typeof | ||
* import('@agoric/swingset-vat/src/devices/plugin/device-plugin.js').buildRootDeviceNode>> } PluginDevice | ||
*/ | ||
|
||
/** | ||
* Create a handler that manages a promise interface to external modules. | ||
* | ||
* @param {Device<PluginDevice>} pluginDevice The bridge to manage | ||
* @param {{ [prop: string]: any, D: <T>(target: Device<T>) => T}} param1 | ||
* @param {PluginDevice} pluginDevice The bridge to manage | ||
* @param {{ [prop: string]: any, D: DProxy }} param1 | ||
* @returns {PluginManager} admin facet for this handler | ||
*/ | ||
export function makePluginManager(pluginDevice, { D, ...vatPowers }) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// eslint-disable-next-line no-undef | ||
missing({}); | ||
|
||
export function buildRootObject(_vatPowers) { | ||
export function buildRootObject() { | ||
return {}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export function buildRootObject(_vatPowers) { | ||
export function buildRootObject() { | ||
// eslint-disable-next-line no-undef | ||
return missing({}); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +0,0 @@ | ||
/** | ||
* @typedef {object} ManualTimerAdmin | ||
* @property { (when: Timestamp) => void } advanceTo | ||
*/ | ||
|
||
/** | ||
* @typedef {ManualTimerAdmin & TimerService} ManualTimer | ||
*/ | ||
mhofman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** | ||
* @typedef {object} ManualTimerOptions | ||
* @property {Timestamp} [startTime=0n] | ||
*/ | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,10 @@ import chalk from 'chalk'; | |
import { makePspawn } from './helpers.js'; | ||
|
||
// Ambient types. Needed only for dev but this does a runtime import. | ||
// https://github.com/Agoric/agoric-sdk/issues/6512 | ||
import '@endo/captp/src/types.js'; | ||
import '@agoric/swingset-vat/exported.js'; | ||
import '@agoric/swingset-vat/src/vats/network/types.js'; | ||
Comment on lines
7
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seeing this now, would it make sense to add Edit: maybe not since it's used directly in other places? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, I considered that and opted for lesser change to what's exported. I figure it will be addressed in further ambients work |
||
|
||
// Use either an absolute template URL, or find it relative to DAPP_URL_BASE. | ||
const gitURL = (relativeOrAbsoluteURL, base) => { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "./jsconfig.json", | ||
"compilerOptions": { | ||
"noEmit": false, | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"declarationMap": true | ||
}, | ||
"exclude": [ | ||
"test/" | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I have a stash with this fix and other swingset ones somewhere