From 180149ea1406e0c548fa4e2aeddabe5f16f6089b Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Thu, 2 Dec 2021 10:14:42 -0600 Subject: [PATCH] feat(far): export `ERef` --- packages/far/src/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/far/src/index.js b/packages/far/src/index.js index 44a2d494d37..0acff36d816 100644 --- a/packages/far/src/index.js +++ b/packages/far/src/index.js @@ -1,7 +1,18 @@ export { E } from '@agoric/eventual-send'; export { Far, getInterfaceOf, passStyleOf } from '@agoric/marshal'; +/** + * @template T + * @typedef {import('@agoric/eventual-send').ERef} ERef + * Declare that `T` can be either a near or far reference. This should be used + * only for arguments and declarations; return values should specifically be + * `Promise` or `T` itself. + */ + /** * @template T * @typedef {import('@agoric/eventual-send').EOnly} EOnly + * A type that must only be invoked with E. It supports the `T` interface + * interface but additionally permits functions to return `PromiseLike`s even if + * `T` declares them as only synchronous. */