Skip to content

Commit

Permalink
feat(far): export ERef<T>
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Dec 2, 2021
1 parent 154da76 commit 180149e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/far/src/index.js
Original file line number Diff line number Diff line change
@@ -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<T>} 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<T>` or `T` itself.
*/

/**
* @template T
* @typedef {import('@agoric/eventual-send').EOnly<T>} 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.
*/

0 comments on commit 180149e

Please sign in to comment.