-
Notifications
You must be signed in to change notification settings - Fork 72
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
more typedoc #1928
more typedoc #1928
Changes from all commits
2ad483e
7d285d8
40ab367
cebcf09
b504123
7a85c93
72beb66
ec7626e
d1fc866
f0ffdbb
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,8 @@ | ||
{ | ||
"extends": [ | ||
"../../typedoc.base.json" | ||
], | ||
"entryPoints": [ | ||
"src/index.js", | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": [ | ||
"../../typedoc.base.json" | ||
], | ||
"entryPoints": [ | ||
"pre.js", | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,16 +4,16 @@ export {}; | |
/** | ||
* @template Slot | ||
* @callback ConvertValToSlot | ||
* @param {import('@endo/pass-style').PassableCap} val | ||
* @param {any} val a PassableCap | ||
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. That seems like a terrible regression, possibly due to types not being built! 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. 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. Then the issue is with the 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. There was indeed an issue with the PassableCap definition. It was Once we fix those types, I expect to return to this. 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. Fix in #1933 |
||
* @returns {Slot} | ||
*/ | ||
|
||
/** | ||
* @template Slot | ||
* @callback ConvertSlotToVal | ||
* @param {Slot} slot | ||
* @param {import('@endo/pass-style').InterfaceSpec} [iface] | ||
* @returns {import('@endo/pass-style').PassableCap} | ||
* @param {string} [iface] | ||
* @returns {any} a PassableCap | ||
*/ | ||
|
||
/** | ||
|
@@ -34,7 +34,7 @@ export {}; | |
* errorId?: string | ||
* } | | ||
* EncodingClass<'slot'> & { index: number, | ||
* iface?: import('@endo/pass-style').InterfaceSpec | ||
* iface?: string | ||
* } | | ||
* EncodingClass<'hilbert'> & { original: Encoding, | ||
* rest?: Encoding | ||
|
@@ -84,15 +84,15 @@ export {}; | |
/** | ||
* @template Slot | ||
* @callback ToCapData | ||
* @param {import('@endo/pass-style').Passable} val | ||
* @param {any} val a Passable | ||
* @returns {CapData<Slot>} | ||
*/ | ||
|
||
/** | ||
* @template Slot | ||
* @callback FromCapData | ||
* @param {CapData<Slot>} data | ||
* @returns {import('@endo/pass-style').Passable} | ||
* @returns {any} a Passable | ||
*/ | ||
|
||
/** | ||
|
@@ -172,8 +172,8 @@ export {}; | |
* ordering would also compare magnitudes, and so agree with the rank ordering | ||
* of all values other than `NaN`. An array sorted by rank would enable range | ||
* queries by magnitude. | ||
* @param {import('@endo/pass-style').Passable} left | ||
* @param {import('@endo/pass-style').Passable} right | ||
* @param {any} left a Passable | ||
* @param {any} right a Passable | ||
* @returns {RankComparison} | ||
*/ | ||
|
||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -6,6 +6,11 @@ import { makeMarshal } from '../src/marshal.js'; | |||||
|
||||||
const { freeze, isFrozen, create, prototype: objectPrototype } = Object; | ||||||
|
||||||
const harden = /** @type {import('ses').Harden & {isFake: boolean}} */ ( | ||||||
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. Would the following also work? If so, I think it better documents the runtime reality it describes. Likewise for the other occurrences of course
Suggested change
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. Yes it would. I'll see about adding tacking that onto another PR. 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. |
||||||
// eslint-disable-next-line no-undef | ||||||
global.harden | ||||||
); | ||||||
|
||||||
// this only includes the tests that do not use liveSlots | ||||||
|
||||||
/** | ||||||
|
@@ -188,7 +193,6 @@ test('serialize static data', t => { | |||||
const m = makeTestMarshal(); | ||||||
const ser = val => m.serialize(val); | ||||||
|
||||||
// @ts-ignore `isFake` purposely omitted from type | ||||||
if (!harden.isFake) { | ||||||
t.throws(() => ser([1, 2]), { | ||||||
message: /Cannot pass non-frozen objects like/, | ||||||
|
@@ -242,22 +246,20 @@ test('serialize errors', t => { | |||||
|
||||||
// Extra properties | ||||||
const errExtra = Error('has extra properties'); | ||||||
// @ts-ignore Check dynamic consequences of type violation | ||||||
// @ts-expect-error Check dynamic consequences of type violation | ||||||
errExtra.foo = []; | ||||||
freeze(errExtra); | ||||||
t.assert(isFrozen(errExtra)); | ||||||
// @ts-ignore `isFake` purposely omitted from type | ||||||
if (!harden.isFake) { | ||||||
// @ts-ignore Check dynamic consequences of type violation | ||||||
// @ts-expect-error Check dynamic consequences of type violation | ||||||
t.falsy(isFrozen(errExtra.foo)); | ||||||
} | ||||||
t.deepEqual(ser(errExtra), { | ||||||
body: '{"@qclass":"error","errorId":"error:anon-marshal#10003","message":"has extra properties","name":"Error"}', | ||||||
slots: [], | ||||||
}); | ||||||
// @ts-ignore `isFake` purposely omitted from type | ||||||
if (!harden.isFake) { | ||||||
// @ts-ignore Check dynamic consequences of type violation | ||||||
// @ts-expect-error Check dynamic consequences of type violation | ||||||
t.falsy(isFrozen(errExtra.foo)); | ||||||
} | ||||||
|
||||||
|
@@ -332,7 +334,6 @@ test('records', t => { | |||||
|
||||||
// empty objects | ||||||
|
||||||
// @ts-ignore `isFake` purposely omitted from type | ||||||
if (!harden.isFake) { | ||||||
// rejected because it is not hardened | ||||||
t.throws( | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": [ | ||
"../../typedoc.base.json" | ||
], | ||
"entryPoints": [ | ||
"index.js" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": [ | ||
"../../typedoc.base.json" | ||
], | ||
"entryPoints": [ | ||
"types.d.ts", | ||
] | ||
} |
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.
What is the significance of this change? Why didn't it cause anything else to change?
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.
These Node modules have no default exports. Under CommonJS the set of named exports could be treated as an object but under ESM you have to bundle the named exports into an object if you want to access them that way.