@agoric/internal 0.3.3-dev-8718c07.0 → 0.3.3-dev-b1d610d.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/internal",
3
- "version": "0.3.3-dev-8718c07.0+8718c07",
3
+ "version": "0.3.3-dev-b1d610d.0+b1d610d",
4
4
  "description": "Externally unsupported utilities internal to agoric-sdk",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -20,7 +20,7 @@
20
20
  "lint:types": "tsc"
21
21
  },
22
22
  "dependencies": {
23
- "@agoric/base-zone": "0.1.1-dev-8718c07.0+8718c07",
23
+ "@agoric/base-zone": "0.1.1-dev-b1d610d.0+b1d610d",
24
24
  "@endo/common": "^1.2.2",
25
25
  "@endo/errors": "^1.2.2",
26
26
  "@endo/far": "^1.1.2",
@@ -59,5 +59,5 @@
59
59
  "typeCoverage": {
60
60
  "atLeast": 93.82
61
61
  },
62
- "gitHead": "8718c0748521ceeb0f7bab04bbe8fe5d1bc643b0"
62
+ "gitHead": "b1d610d4b67ece096945cc0baccc928b6a6dcfd3"
63
63
  }
@@ -36,14 +36,6 @@ export function documentStorageSchema(t: import("ava").ExecutionContext<unknown>
36
36
  pattern: string;
37
37
  replacement: string;
38
38
  } | {})): Promise<void>;
39
- /**
40
- * A map corresponding with a total function such that `get(key)` is assumed to
41
- * always succeed.
42
- */
43
- export type TotalMap<K, V> = { [k in Exclude<keyof Map<K, V>, "get">]: Map<K, V>[k]; } & {
44
- get: (key: K) => V;
45
- };
46
- export type TotalMapFrom<T> = T extends Map<infer K, infer V> ? TotalMap<K, V> : never;
47
39
  export type FakeStorageKit = ReturnType<typeof makeFakeStorageKit>;
48
40
  export type MockChainStorageRootMethods = {
49
41
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"storage-test-utils.d.ts","sourceRoot":"","sources":["storage-test-utils.js"],"names":[],"mappings":"A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AA2B;qCA1NJ,uBAAuB;iCAKF,uBAAuB;oCAAvB,uBAAuB;gCAAvB,uBAAuB"}
1
+ {"version":3,"file":"storage-test-utils.d.ts","sourceRoot":"","sources":["storage-test-utils.js"],"names":[],"mappings":"AAwBO,yCAHI,MAAM,UACN,MAAM,0GAGC;AAElB;;;GAGG;AACH;;;;;EAEG;AA4CH,8CAtBuB,GAAG,KAAK,GAAG,CAsB+B;AAU1D,6CAHI,MAAM,gBACN,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC;;;;;oBA+G9C,CAAC;;;;UANa,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;;yBAhF1B,cAAc;;;;EAoF3B;AAoBM,4CADO,oBAAoB,CA6BjC;AAQM,yCALI,OAAO,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC,WACvC,oBAAoB,GAAG,cAAc,QACrC,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,GAC9D,CAAK;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,EAAE,CAAC,iBAkCnD;6BAtFa,UAAU,CAAC,OAAO,kBAAkB,CAAC;;;;;;;;aAIrC,CACb,IAAQ,EAAE,MAAM,EAChB,UAAc,CAAC,EAAE,UAAU,EAC3B,KAAS,CAAC,EAAE,MAAM,KACX,OAAO;UAKD,MAAM,MAAM,EAAE;;mCAEd,WAAW,GAAG,2BAA2B;qCA7MJ,uBAAuB;iCAMF,uBAAuB;oCAAvB,uBAAuB;gCAAvB,uBAAuB"}
@@ -9,25 +9,12 @@ import { bindAllMethods } from './method-tools.js';
9
9
  import { eventLoopIteration } from './testing-utils.js';
10
10
 
11
11
  /**
12
+ * @import {TotalMap} from './types.js';
12
13
  * @import {Marshaller, StorageEntry, StorageMessage, StorageNode} from './lib-chainStorage.js';
13
14
  */
14
15
 
15
16
  const trace = makeTracer('StorTU', false);
16
17
 
17
- /**
18
- * A map corresponding with a total function such that `get(key)` is assumed to
19
- * always succeed.
20
- *
21
- * @template K, V
22
- * @typedef {{ [k in Exclude<keyof Map<K, V>, 'get'>]: Map<K, V>[k] } & {
23
- * get: (key: K) => V;
24
- * }} TotalMap
25
- */
26
- /**
27
- * @template T
28
- * @typedef {T extends Map<infer K, infer V> ? TotalMap<K, V> : never} TotalMapFrom
29
- */
30
-
31
18
  /**
32
19
  * A convertSlotToVal function that produces basic Remotables. Assumes that all
33
20
  * slots are Remotables (i.e. none are Promises).
package/src/types.d.ts CHANGED
@@ -3,6 +3,17 @@ import type { ERef, RemotableBrand } from '@endo/eventual-send';
3
3
  import type { Primitive } from '@endo/pass-style';
4
4
  import type { Callable } from './utils.js';
5
5
 
6
+ /**
7
+ * A map corresponding with a total function such that `get(key)` is assumed to
8
+ * always succeed.
9
+ */
10
+ export type TotalMap<K, V> = Omit<Map<K, V>, 'get'> & {
11
+ /** Returns the element associated with the specified key in the TotalMap. */
12
+ get: (key: K) => V;
13
+ };
14
+ export type TotalMapFrom<M extends Map> =
15
+ M extends Map<infer K, infer V> ? TotalMap<K, V> : never;
16
+
6
17
  export declare class Callback<I extends (...args: unknown[]) => any> {
7
18
  private iface: I;
8
19