Endo API documentation - v0.2.0 / Exports / @endo/exo
Module: @endo/exo
Table of contents
Variables
Functions
Variables
GET_INTERFACE_GUARD
• Const GET_INTERFACE_GUARD: "__getInterfaceGuard__"
The name of the automatically added default meta-method for obtaining an exo's interface, if it has one.
Intended to be similar to GET_METHOD_NAMES from @endo/pass-style.
TODO Name to be bikeshed. Perhaps even whether it is a string or symbol to be bikeshed. See https://github.com/endojs/endo/pull/1809#discussion_r1388052454
TODO Beware that an exo's interface can change across an upgrade, so remotes that cache it can become stale.
Defined in
Functions
defineExoClass
▸ defineExoClass<I, M>(tag, interfaceGuard, init, methods, options?): (...args: Parameters<I>) => Guarded<M>
Type parameters
| Name | Type | Description |
|---|---|---|
I | extends (...args: any[]) => any | init function |
M | extends Methods | methods |
Parameters
| Name | Type |
|---|---|
tag | string |
interfaceGuard | undefined | InterfaceGuard<{ [K in string | number | symbol]: MethodGuard }> |
init | I |
methods | M & ThisType<{ self: Guarded<M> ; state: ReturnType<I> }> |
options? | FarClassOptions<ClassContext<ReturnType<I>, M>, any> |
Returns
fn
▸ (...args): Guarded<M>
Parameters
| Name | Type |
|---|---|
...args | Parameters<I> |
Returns
Guarded<M>
Defined in
defineExoClassKit
▸ defineExoClassKit<I, F>(tag, interfaceGuardKit, init, methodsKit, options?): (...args: Parameters<I>) => GuardedKit<F>
Type parameters
| Name | Type | Description |
|---|---|---|
I | extends (...args: any[]) => any | init function |
F | extends Record<string, Methods> | facet methods |
Parameters
| Name | Type |
|---|---|
tag | string |
interfaceGuardKit | undefined | { [K in string | number | symbol]: InterfaceGuard<{ [M in string | number | symbol]: MethodGuard }> } |
init | I |
methodsKit | F & { [K in string | number | symbol]: ThisType<Object> } |
options? | FarClassOptions<KitContext<ReturnType<I>, GuardedKit<F>>, GuardedKit<F>> |
Returns
fn
▸ (...args): GuardedKit<F>
Parameters
| Name | Type |
|---|---|
...args | Parameters<I> |
Returns
GuardedKit<F>
Defined in
initEmpty
▸ initEmpty(): Object
When calling defineDurableKind and its siblings, used as the init function argument to indicate that the state record of the (virtual/durable) instances of the kind/exoClass should be empty, and that the returned maker function should have zero parameters.
Returns
Object
Defined in
makeExo
▸ makeExo<T>(tag, interfaceGuard, methods, options?): Guarded<T>
Type parameters
| Name | Type |
|---|---|
T | extends Methods |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
tag | string | undefined | - |
interfaceGuard | undefined | InterfaceGuard<{ [M in string | number | symbol]: MethodGuard }> | undefined | CAVEAT: static typing does not yet support callWhen transformation |
methods | T | undefined | - |
options? | FarClassOptions<ClassContext<{}, T>, any> | undefined | - |
Returns
Guarded<T>