@agoric/internal
Advanced tools
Comparing version 0.1.1-dev-45bc8a1.0 to 0.1.1-dev-6f70fab.0
{ | ||
"name": "@agoric/internal", | ||
"version": "0.1.1-dev-45bc8a1.0+45bc8a1", | ||
"version": "0.1.1-dev-6f70fab.0+6f70fab", | ||
"description": "Externally unsupported utilities internal to agoric-sdk", | ||
@@ -22,2 +22,3 @@ "type": "module", | ||
"@endo/eventual-send": "^0.15.5", | ||
"@endo/marshal": "^0.6.9", | ||
"@endo/promise-kit": "^0.2.43" | ||
@@ -37,3 +38,3 @@ }, | ||
}, | ||
"gitHead": "45bc8a1896c5f51b6fb41863b50fd16c18cfcdff" | ||
"gitHead": "6f70fab0ecb40bc1bdb2e5ef6c734abdedb7cad4" | ||
} |
// @ts-check | ||
import { E } from '@endo/eventual-send'; | ||
import { deeplyFulfilled, isObject } from '@endo/marshal'; | ||
import { isPromise } from '@endo/promise-kit'; | ||
@@ -181,1 +182,26 @@ | ||
harden(bindAllMethods); | ||
/** | ||
* @template {{}} T | ||
* @typedef {{ [K in keyof T]: DeeplyAwaited<T[K]> }} DeeplyAwaitedObject | ||
*/ | ||
/** | ||
* Caveats: | ||
* - doesn't recur within Promise results | ||
* - resulting type has wrapper in its name | ||
* | ||
* @template T | ||
* @typedef {T extends PromiseLike ? Awaited<T> : T extends {} ? DeeplyAwaitedObject<T> : Awaited<T>} DeeplyAwaited | ||
*/ | ||
/** | ||
* A more constrained version of {deeplyFulfilled} for type safety until https://github.com/endojs/endo/issues/1257 | ||
* Useful in starting contracts that need all terms to be fulfilled in order to be durable. | ||
* | ||
* @type {<T extends {}>(unfulfilledTerms: T) => DeeplyAwaited<T>} | ||
*/ | ||
export const deeplyFulfilledObject = obj => { | ||
assert(isObject(obj), 'param must be an object'); | ||
return deeplyFulfilled(obj); | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
20673
195
3
+ Added@endo/marshal@^0.6.9
+ Added@endo/marshal@0.6.9(transitive)
+ Added@endo/nat@4.1.31(transitive)