Endo API documentation - v0.2.0 / Exports / @endo/eventual-send
Module: @endo/eventual-send
Table of contents
Classes
Type Aliases
- DataOnly
- EHandler
- EOnly
- EProxy
- ERef
- FarRef
- FilteredKeys
- HandledExecutor
- HandledPromiseConstructor
- HandledPromiseStaticMethods
- LocalRecord
- PickCallable
- RemoteFunctions
- RemoteKit
- ResolveWithPresenceOptionsBag
- Settler
Variables
Functions
Type Aliases
DataOnly
Ƭ DataOnly<T
>: Omit
<T
, FilteredKeys
<T
, Callable
>>
Type parameters
Name | Description |
---|---|
T | The type to be filtered. |
Defined in
packages/eventual-send/src/E.js:261
EHandler
Ƭ EHandler<T
>: Object
Type parameters
Name |
---|
T |
Type declaration
Name | Type |
---|---|
applyFunction? | (p : T , args : unknown [], returnedP? : Promise <unknown >) => unknown |
applyFunctionSendOnly? | (p : T , args : unknown []) => void |
applyMethod? | (p : T , name : undefined | PropertyKey , args : unknown [], returnedP? : Promise <unknown >) => unknown |
applyMethodSendOnly? | (p : T , name : undefined | PropertyKey , args : unknown []) => void |
get? | (p : T , name : PropertyKey , returnedP? : Promise <unknown >) => unknown |
getSendOnly? | (p : T , name : PropertyKey ) => void |
Defined in
packages/eventual-send/src/handled-promise.js:591
EOnly
Ƭ EOnly<T
>: T
extends Callable
? (...args
: Parameters
<T
>) => ERef
<Awaited
<EOnly
<ReturnType
<T
>>>> : T
extends Record
<PropertyKey
, Callable
> ? { [K in keyof T]: T[K] extends Callable ? Function : T[K] } : T
Type parameters
Name |
---|
T |
Defined in
packages/eventual-send/src/E.js:407
EProxy
Ƭ EProxy: ReturnType
<makeE
>
Defined in
packages/eventual-send/src/E.js:245
ERef
Ƭ ERef<T
>: PromiseLike
<T
> | T
Type parameters
Name |
---|
T |
Defined in
packages/eventual-send/src/E.js:267
FarRef
Ƭ FarRef<Primary
, Local
>: ERef
<Local
& RemotableBrand
>
Type parameters
Name | Type | Description |
---|---|---|
Primary | Primary | The type of the primary reference. |
Local | DataOnly <Primary > | The local properties of the object. |
Defined in
packages/eventual-send/src/E.js:253
FilteredKeys
Ƭ FilteredKeys<T
, U
>: { [P in keyof T]: T[P] extends U ? P : never }[keyof T
]
Type parameters
Name |
---|
T |
U |
Defined in
packages/eventual-send/src/E.js:341
HandledExecutor
Ƭ HandledExecutor<R
>: (resolveHandled
: (value?
: R
) => void
, rejectHandled
: (reason?
: unknown
) => void
, resolveWithPresence
: (presenceHandler
: EHandler
<{}>, options?
: ResolveWithPresenceOptionsBag
<{}>) => object
) => void
Type parameters
Name | Type |
---|---|
R | unknown |
Type declaration
▸ (resolveHandled
, rejectHandled
, resolveWithPresence
): void
Parameters
Name | Type |
---|---|
resolveHandled | (value? : R ) => void |
rejectHandled | (reason? : unknown ) => void |
resolveWithPresence | (presenceHandler : EHandler <{}>, options? : ResolveWithPresenceOptionsBag <{}>) => object |
Returns
void
Defined in
packages/eventual-send/src/handled-promise.js:611
HandledPromiseConstructor
Ƭ HandledPromiseConstructor: ReturnType
<typeof makeHandledPromise
>
Defined in
packages/eventual-send/src/handled-promise.js:634
HandledPromiseStaticMethods
Ƭ HandledPromiseStaticMethods: Object
Type declaration
Name | Type |
---|---|
applyFunction | (target : unknown , args : unknown []) => Promise <unknown > |
applyFunctionSendOnly | (target : unknown , args : unknown []) => void |
applyMethod | (target : unknown , prop : undefined | PropertyKey , args : unknown []) => Promise <unknown > |
applyMethodSendOnly | (target : unknown , prop : PropertyKey , args : unknown []) => void |
get | (target : unknown , prop : PropertyKey ) => Promise <unknown > |
getSendOnly | (target : unknown , prop : PropertyKey ) => void |
Defined in
packages/eventual-send/src/handled-promise.js:631
LocalRecord
Ƭ LocalRecord<T
>: T
extends RemotableBrand
? L
: Awaited
<T
> extends RemotableBrand
? L
: T
extends PromiseLike
<infer U> ? Awaited
<T
> : T
Type parameters
Name |
---|
T |
Defined in
packages/eventual-send/src/E.js:381
PickCallable
Ƭ PickCallable<T
>: T
extends Callable
? (...args
: Parameters
<T
>) => ReturnType
<T
> : Pick
<T
, FilteredKeys
<T
, Callable
>>
Type parameters
Name |
---|
T |
Defined in
packages/eventual-send/src/E.js:353
RemoteFunctions
Ƭ RemoteFunctions<T
>: T
extends RemotableBrand
? PickCallable
<R
> : Awaited
<T
> extends RemotableBrand
? PickCallable
<R
> : T
extends PromiseLike
<infer U> ? Awaited
<T
> : T
Type parameters
Name |
---|
T |
Defined in
packages/eventual-send/src/E.js:368
RemoteKit
Ƭ RemoteKit<R
>: Object
Type parameters
Name | Type |
---|---|
R | unknown |
Type declaration
Name | Type |
---|---|
promise | Promise <R > |
settler | Settler |
Defined in
packages/eventual-send/src/E.js:389
ResolveWithPresenceOptionsBag
Ƭ ResolveWithPresenceOptionsBag<T
>: Object
Type parameters
Name | Type |
---|---|
T | extends Object |
Type declaration
Name | Type |
---|---|
proxy? | { handler : ProxyHandler <T > ; target : unknown ; revokerCallback? : (revoker : () => void ) => void } |
proxy.handler | ProxyHandler <T > |
proxy.target | unknown |
proxy.revokerCallback? | [object Object] |
Defined in
packages/eventual-send/src/handled-promise.js:602
Settler
Ƭ Settler<R
>: Object
Type parameters
Name | Type |
---|---|
R | unknown |
Type declaration
Name | Type |
---|---|
reject | (reason : unknown ) => void |
resolve | (value? : R ) => void |
resolveWithPresence | (presenceHandler? : EHandler <{}>, options? : ResolveWithPresenceOptionsBag <{}>) => any |
Defined in
packages/eventual-send/src/handled-promise.js:620
Variables
HandledPromise
• Const
HandledPromise: HandledPromiseConstructor
= HandledPromise
Defined in
packages/eventual-send/src/no-shim.js:3
Functions
E
▸ E<T
>(x
): ECallableOrMethods
<RemoteFunctions
<T
>>
E(x) returns a proxy on which you can call arbitrary methods. Each of these method calls returns a promise. The method will be invoked on whatever 'x' designates (or resolves to) in a future turn, not this one.
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
x | T | target for method/function call |
Returns
ECallableOrMethods
<RemoteFunctions
<T
>>
method/function call proxy