@agoric/base-zone 0.1.1-dev-da94029.0 → 0.1.1-dev-d950170.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/base-zone",
3
- "version": "0.1.1-dev-da94029.0+da94029",
3
+ "version": "0.1.1-dev-d950170.0+d950170",
4
4
  "description": "Allocation zone abstraction library and heap implementation",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/Agoric/agoric-sdk",
@@ -59,5 +59,5 @@
59
59
  "typeCoverage": {
60
60
  "atLeast": 91.4
61
61
  },
62
- "gitHead": "da940299e592bd6866ddb29e4ceebdbe17c79ce0"
62
+ "gitHead": "d9501704148a9118bc62a9d84aada966dc2deb0f"
63
63
  }
@@ -1,11 +1,13 @@
1
1
  export function prepareRevocableMakerKit<U = any>(zone: import("@agoric/base-zone").Zone, uKindName: string, uMethodNames: PropertyKey[], options?: RevocableKitOptions<U>): RevocableMakerKit<U>;
2
2
  export type MakeRevocable<U = any> = (underlying: U) => Partial<U>;
3
+ export type MakeRevocableKit<U = any> = (underlying: U) => RevocableKit<U>;
3
4
  export type RevocableMakerKit<U = any> = {
4
5
  revoke: (revocable: U) => boolean;
5
6
  /**
6
7
  * Forwards to the underlying exo object, until revoked
7
8
  */
8
- makeRevocable: MakeRevocable;
9
+ makeRevocable: MakeRevocable<U>;
10
+ makeRevocableKit: MakeRevocableKit<U>;
9
11
  };
10
12
  export type RevokerFacet = {
11
13
  revoke: () => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"prepare-revocable.d.ts","sourceRoot":"","sources":["prepare-revocable.js"],"names":[],"mappings":"AAiFO,yCAVO,CAAC,cACJ,OAAO,mBAAmB,EAAE,IAAI,aAChC,MAAM,gBAEN,WAAW,EAAE,YAGb,mBAAmB,CAAC,CAAC,CAAC,GACpB,iBAAiB,CAAC,CAAC,CAAC,CA0EhC;0BA7Ia,CAAC,uBAEJ,CAAC,KACC,OAAO,CAAC,CAAC,CAAC;8BAIT,CAAC;YAED,CAAC,SAAS,EAAE,CAAC,KAAK,OAAO;;;;mBACzB,aAAa;;;YAMb,MAAM,OAAO;;yBAIb,CAAC;aAED,YAAY;;;;eACZ,OAAO,CAAC,CAAC,CAAC;;6BAKV,CAAC;YAED,YAAY,CAAC,CAAC,CAAC;WACf;QAAE,UAAU,EAAE,CAAC,CAAA;KAAE;;gCAIjB,CAAC;;;;;;;;;;;;;;;;8CAcH,gBAAgB,CAAC,CAAC,CAAC,WAAW,GAAG,EAAE,KAAK,GAAG"}
1
+ {"version":3,"file":"prepare-revocable.d.ts","sourceRoot":"","sources":["prepare-revocable.js"],"names":[],"mappings":"AAyFO,yCAVO,CAAC,cACJ,OAAO,mBAAmB,EAAE,IAAI,aAChC,MAAM,gBAEN,WAAW,EAAE,YAGb,mBAAmB,CAAC,CAAC,CAAC,GACpB,iBAAiB,CAAC,CAAC,CAAC,CA4EhC;0BAvJa,CAAC,uBAEJ,CAAC,KACC,OAAO,CAAC,CAAC,CAAC;6BAIT,CAAC,uBAEJ,CAAC,KACC,YAAY,CAAC,CAAC,CAAC;8BAId,CAAC;YAED,CAAC,SAAS,EAAE,CAAC,KAAK,OAAO;;;;mBACzB,aAAa,CAAC,CAAC,CAAC;sBAEhB,gBAAgB,CAAC,CAAC,CAAC;;;YAKnB,MAAM,OAAO;;yBAIb,CAAC;aAED,YAAY;;;;eACZ,OAAO,CAAC,CAAC,CAAC;;6BAKV,CAAC;YAED,YAAY,CAAC,CAAC,CAAC;WACf;QAAE,UAAU,EAAE,CAAC,CAAA;KAAE;;gCAIjB,CAAC;;;;;;;;;;;;;;;;8CAcH,gBAAgB,CAAC,CAAC,CAAC,WAAW,GAAG,EAAE,KAAK,GAAG"}
@@ -16,12 +16,20 @@ import { wrapperMethods } from './prepare-attenuator.js';
16
16
  * @returns {Partial<U>}
17
17
  */
18
18
 
19
+ /**
20
+ * @template [U=any]
21
+ * @callback MakeRevocableKit
22
+ * @param {U} underlying
23
+ * @returns {RevocableKit<U>}
24
+ */
25
+
19
26
  /**
20
27
  * @template [U=any]
21
28
  * @typedef {object} RevocableMakerKit
22
29
  * @property {(revocable: U) => boolean} revoke
23
- * @property {MakeRevocable} makeRevocable
30
+ * @property {MakeRevocable<U>} makeRevocable
24
31
  * Forwards to the underlying exo object, until revoked
32
+ * @property {MakeRevocableKit<U>} makeRevocableKit
25
33
  */
26
34
 
27
35
  /**
@@ -150,6 +158,8 @@ export const prepareRevocableMakerKit = (
150
158
  return harden({
151
159
  revoke,
152
160
  makeRevocable,
161
+ /** @type {MakeRevocableKit} */
162
+ makeRevocableKit,
153
163
  });
154
164
  };
155
165
  harden(prepareRevocableMakerKit);