@agoric/internal
Advanced tools
Comparing version 0.1.1-dev-84f0198.0 to 0.1.1-dev-8d5bd3f.0
{ | ||
"name": "@agoric/internal", | ||
"version": "0.1.1-dev-84f0198.0+84f0198", | ||
"version": "0.1.1-dev-8d5bd3f.0+8d5bd3f", | ||
"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": "84f0198aa596591d574a7b218b84b73889574cc7" | ||
"gitHead": "8d5bd3f1ea349027ed9b4c4f66552101f02c1383" | ||
} |
// @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)