@agoric/internal 0.2.2-dev-398b70f.0 → 0.2.2-dev-748d52c.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 +2 -2
- package/src/utils.d.ts +6 -4
- package/src/utils.d.ts.map +1 -1
- package/src/utils.js +6 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/internal",
|
|
3
|
-
"version": "0.2.2-dev-
|
|
3
|
+
"version": "0.2.2-dev-748d52c.0+748d52c",
|
|
4
4
|
"description": "Externally unsupported utilities internal to agoric-sdk",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "748d52cf888981c8c48c26a807fe5abf12ed4130"
|
|
41
41
|
}
|
package/src/utils.d.ts
CHANGED
|
@@ -22,12 +22,14 @@ export function applyLabelingError<A, R>(func: (...args: A[]) => R, args: A[], l
|
|
|
22
22
|
* @typedef {T extends PromiseLike<any> ? Awaited<T> : T extends {} ? Simplify<DeeplyAwaitedObject<T>> : Awaited<T>} DeeplyAwaited
|
|
23
23
|
*/
|
|
24
24
|
/**
|
|
25
|
-
* A more constrained version of {deeplyFulfilled} for type safety until
|
|
26
|
-
*
|
|
25
|
+
* A more constrained version of {deeplyFulfilled} for type safety until
|
|
26
|
+
* https://github.com/endojs/endo/issues/1257
|
|
27
|
+
* Useful in starting contracts that need all terms to be fulfilled
|
|
28
|
+
* in order to be durable.
|
|
27
29
|
*
|
|
28
|
-
* @type {<T extends {}>(unfulfilledTerms: T) =>
|
|
30
|
+
* @type {<T extends {}>(unfulfilledTerms: T) => Promise<DeeplyAwaited<T>>}
|
|
29
31
|
*/
|
|
30
|
-
export const deeplyFulfilledObject: <T extends {}>(unfulfilledTerms: T) =>
|
|
32
|
+
export const deeplyFulfilledObject: <T extends {}>(unfulfilledTerms: T) => Promise<DeeplyAwaited<T>>;
|
|
31
33
|
export function makeMeasureSeconds(currentTimeMillisec: typeof import('perf_hooks').performance.now): <T>(fn: () => Promise<T>) => Promise<{
|
|
32
34
|
result: T;
|
|
33
35
|
duration: number;
|
package/src/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.js"],"names":[],"mappings":"AAYA,kCAAoC;AAa7B,0EAcN;AA0CM,gJAIN;AAQM,0CAHI,MAAM,MAAM,GAAG,MAAM,CAAC,cACtB,MAAM,MAAM,GAAG,MAAM,CAAC,uBAKhC;AASM,uCALI,KAAK,SACL,MAAM,GAAC,MAAM,oDAEX,KAAK,CAYjB;AAUM,uHAsBN;AAGD;;;;;GAKG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.js"],"names":[],"mappings":"AAYA,kCAAoC;AAa7B,0EAcN;AA0CM,gJAIN;AAQM,0CAHI,MAAM,MAAM,GAAG,MAAM,CAAC,cACtB,MAAM,MAAM,GAAG,MAAM,CAAC,uBAKhC;AASM,uCALI,KAAK,SACL,MAAM,GAAC,MAAM,oDAEX,KAAK,CAYjB;AAUM,uHAsBN;AAGD;;;;;GAKG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;;;;GAOG;AACH,qGAGE;AAUK,wDAHI,cAAc,YAAY,EAAE,WAAW,CAAC,GAAG;;cACmB,MAAM;GAW9E;AAMM,2CAHI,KAAK,EAAE,uCAcjB;AAOM,4FAeN;AAED;;;;;GAKG,CAAC,mFAFoB,OAAO,KAAK,QAAQ,IAAI,CAAC,gBAY7C;AAiBG,0GAUN;AAQD,+CAAoD;AAU7C,0EAUH;AAUG,0EAaH;AAEJ,oDAAoD;AACpD,uDAAqE;AAErE,2GAA2G;AAC3G,+GAIE;;;;sBA3UwB,OAAO,qBAAqB,EAAE,IAAI,CAAC,CAAC,CAAC;;;;;;iCAgJxC,GAAG,EAAE,KAAK,GAAG;;+BAUvB,CAAC,SAAS,YAAY,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,SAAS,oBAAoB,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC"}
|
package/src/utils.js
CHANGED
|
@@ -170,12 +170,14 @@ harden(applyLabelingError);
|
|
|
170
170
|
*/
|
|
171
171
|
|
|
172
172
|
/**
|
|
173
|
-
* A more constrained version of {deeplyFulfilled} for type safety until
|
|
174
|
-
*
|
|
173
|
+
* A more constrained version of {deeplyFulfilled} for type safety until
|
|
174
|
+
* https://github.com/endojs/endo/issues/1257
|
|
175
|
+
* Useful in starting contracts that need all terms to be fulfilled
|
|
176
|
+
* in order to be durable.
|
|
175
177
|
*
|
|
176
|
-
* @type {<T extends {}>(unfulfilledTerms: T) =>
|
|
178
|
+
* @type {<T extends {}>(unfulfilledTerms: T) => Promise<DeeplyAwaited<T>>}
|
|
177
179
|
*/
|
|
178
|
-
export const deeplyFulfilledObject = obj => {
|
|
180
|
+
export const deeplyFulfilledObject = async obj => {
|
|
179
181
|
isObject(obj) || Fail`param must be an object`;
|
|
180
182
|
return deeplyFulfilled(obj);
|
|
181
183
|
};
|