@agoric/eventual-send
Advanced tools
Comparing version 0.6.0 to 0.7.0
@@ -6,2 +6,21 @@ # Change Log | ||
# [0.7.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/eventual-send@0.7.0-alpha.0...@agoric/eventual-send@0.7.0) (2020-04-02) | ||
**Note:** Version bump only for package @agoric/eventual-send | ||
# [0.7.0-alpha.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/eventual-send@0.6.0...@agoric/eventual-send@0.7.0-alpha.0) (2020-04-02) | ||
### Features | ||
* add E.when(x, onfulfilled, onrejected) as a convenience ([4415f67](https://github.com/Agoric/agoric-sdk/commit/4415f67651f7770fddea85272ee7a02b69b9e8aa)) | ||
# 0.6.0 (2020-03-26) | ||
@@ -8,0 +27,0 @@ |
@@ -77,2 +77,5 @@ 'use strict'; | ||
E.when = (x, onfulfilled = undefined, onrejected = undefined) => | ||
HandledPromise.resolve(x).then(onfulfilled, onrejected); | ||
return harden(E); | ||
@@ -79,0 +82,0 @@ } |
@@ -71,2 +71,5 @@ import harden from '@agoric/harden'; | ||
E.when = (x, onfulfilled = undefined, onrejected = undefined) => | ||
HandledPromise.resolve(x).then(onfulfilled, onrejected); | ||
return harden(E); | ||
@@ -73,0 +76,0 @@ } |
@@ -77,2 +77,5 @@ (function (global, factory) { | ||
E.when = (x, onfulfilled = undefined, onrejected = undefined) => | ||
HandledPromise.resolve(x).then(onfulfilled, onrejected); | ||
return harden(E); | ||
@@ -79,0 +82,0 @@ } |
{ | ||
"name": "@agoric/eventual-send", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "Extend a Promise class to implement the eventual-send API", | ||
@@ -17,3 +17,3 @@ "main": "dist/eventual-send.cjs.js", | ||
"type": "git", | ||
"url": "git+https://github.com/Agoric/eventual-send.git" | ||
"url": "git+https://github.com/Agoric/agoric-sdk.git" | ||
}, | ||
@@ -23,5 +23,5 @@ "author": "Agoric", | ||
"bugs": { | ||
"url": "https://github.com/Agoric/eventual-send/issues" | ||
"url": "https://github.com/Agoric/agoric-sdk/issues" | ||
}, | ||
"homepage": "https://github.com/Agoric/eventual-send#readme", | ||
"homepage": "https://github.com/Agoric/agoric-sdk#readme", | ||
"dependencies": { | ||
@@ -47,3 +47,6 @@ "@agoric/harden": "^0.0.4" | ||
], | ||
"gitHead": "c954aea51be34003243e40837e7e579a03a034cc" | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "536b8e521e881357ca2945533b027ab0bd4b85e5" | ||
} |
@@ -73,3 +73,6 @@ /* global */ | ||
E.when = (x, onfulfilled = undefined, onrejected = undefined) => | ||
HandledPromise.resolve(x).then(onfulfilled, onrejected); | ||
return harden(E); | ||
} |
@@ -14,3 +14,3 @@ // Type definitions for eventual-send | ||
rejectHandled: (reason?: unknown) => void, | ||
resolveWithPresence: (presenceHandler: EHandler) => object, | ||
resolveWithRemote: (remoteHandler: EHandler) => object, | ||
) => void; | ||
@@ -32,8 +32,8 @@ | ||
interface ESingleMethod<R = Promise<unknown>> { | ||
(...args: unknown[]): R; | ||
readonly [prop: Property]: (...args: unknown[]) => R; | ||
(...args: unknown[]) => R; | ||
readonly [prop: string]: (...args: unknown[]) => R; | ||
} | ||
interface ESingleGet<R = Promise<unknown>> { | ||
readonly [prop: Property]: R; | ||
readonly [prop: string]: R; | ||
} | ||
@@ -69,2 +69,11 @@ | ||
/** | ||
* E.when(x, res, rej) is equivalent to HandledPromise.resolve(x).then(res, rej) | ||
*/ | ||
readonly when( | ||
x: unknown, | ||
onfulfilled?: (value: unknown) => unknown | PromiseLike<unknown>, | ||
onrejected?: (reason: any) => PromiseLike<never>, | ||
): Promise<unknown>; | ||
/** | ||
* E.sendOnly returns a proxy similar to E, but for which the results | ||
@@ -71,0 +80,0 @@ * are ignored (undefined is returned). |
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
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
81575
1837