interface ExoZone {
    exo: (<T>(tag, interfaceGuard, methods, options?) => Guarded<T>);
    exoClass: (<I, M>(tag, interfaceGuard, init, methods, options?) => ((...args) => Guarded<M>));
    exoClassKit: (<I, F>(tag, interfaceGuardKit, init, methodsKit, options?) => ((...args) => GuardedKit<F>));
    makeOnce: (<T>(key, maker) => T);
    subZone: ((label, options?) => Zone);
    watchPromise: ((p, watcher, ...watcherArgs) => void);
}

Properties

exo: (<T>(tag, interfaceGuard, methods, options?) => Guarded<T>)

create a singleton exo-object instance bound to this zone

Type declaration

    • <T>(tag, interfaceGuard, methods, options?): Guarded<T>
    • Type Parameters

      • T extends Methods

      Parameters

      • tag: string
      • interfaceGuard: undefined | InterfaceGuard<{
            [M in string | number | symbol]: MethodGuard
        }>
      • methods: T
      • Optional options: FarClassOptions<ClassContext<{}, T>>

      Returns Guarded<T>

exoClass: (<I, M>(tag, interfaceGuard, init, methods, options?) => ((...args) => Guarded<M>))

create a maker function that can be used to create exo-objects bound to this zone

Type declaration

    • <I, M>(tag, interfaceGuard, init, methods, options?): ((...args) => Guarded<M>)
    • Type Parameters

      • I extends ((...args) => any)
      • M extends Methods

      Parameters

      • tag: string
      • interfaceGuard: undefined | ExoClassInterfaceGuard<M>
      • init: I
      • methods: ExoClassMethods<M, I>
      • Optional options: FarClassOptions<ClassContext<ReturnType<I>, M>>

      Returns ((...args) => Guarded<M>)

        • (...args): Guarded<M>
        • Parameters

          • Rest ...args: Parameters<I>

          Returns Guarded<M>

exoClassKit: (<I, F>(tag, interfaceGuardKit, init, methodsKit, options?) => ((...args) => GuardedKit<F>))

create a "kit" maker function that can be used to create a record of exo-objects sharing the same state

Type declaration

    • <I, F>(tag, interfaceGuardKit, init, methodsKit, options?): ((...args) => GuardedKit<F>)
    • Type Parameters

      • I extends ((...args) => any)
      • F extends Record<string, Methods>

      Parameters

      • tag: string
      • interfaceGuardKit: undefined | ExoClassInterfaceGuardKit<F>
      • init: I
      • methodsKit: ExoClassKitMethods<F, I>
      • Optional options: FarClassOptions<KitContext<ReturnType<I>, GuardedKit<F>>, GuardedKit<F>>

      Returns ((...args) => GuardedKit<F>)

        • (...args): GuardedKit<F>
        • Parameters

          • Rest ...args: Parameters<I>

          Returns GuardedKit<F>

makeOnce: (<T>(key, maker) => T)

create or retrieve a singleton object bound to this zone

Type declaration

    • <T>(key, maker): T
    • Type Parameters

      • T

      Parameters

      • key: string
      • maker: ((key) => T)
          • (key): T
          • Parameters

            • key: string

            Returns T

      Returns T

subZone: ((label, options?) => Zone)

create a new Zone that can be passed to untrusted consumers without exposing the storage of the parent zone

Type declaration

watchPromise: ((p, watcher, ...watcherArgs) => void)

register a promise watcher created by this zone

Type declaration

    • (p, watcher, ...watcherArgs): void
    • Parameters

      Returns void