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);
}

Properties

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

Type declaration

    • <T>(tag, interfaceGuard, methods, options?): Guarded<T>
    • create a singleton exo-object instance bound to this zone

      Type Parameters

      • T extends Methods

      Parameters

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

      Returns Guarded<T>

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

Type declaration

    • <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 Parameters

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

      • M extends Methods

      Parameters

      • tag: string
      • interfaceGuard: undefined | InterfaceGuard<{
            [K in string | number | symbol]: MethodGuard
        }>
      • init: I
      • methods: M & ThisType<{
            self: Guarded<M>;
            state: ReturnType<I>;
        }>
      • Optional options: FarClassOptions<ClassContext<S, M>, any>

      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>))

Type declaration

    • <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 Parameters

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

      • F extends Record<string, Methods>

      Parameters

      • tag: string
      • interfaceGuardKit: undefined | {
            [K in string | number | symbol]: InterfaceGuard<{
                [M in string | number | symbol]: MethodGuard
            }>
        }
      • init: I
      • methodsKit: F & {
            [K_1 in string | number | symbol]: ThisType<{
                facets: GuardedKit<F>;
                state: ReturnType<I>;
            }>
        }
      • Optional options: FarClassOptions<KitContext<S, F>, GuardedKit<F>>

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

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

          • Rest ...args: Parameters<I>

          Returns GuardedKit<F>

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

Type declaration

    • <T>(key, maker): T
    • create or retrieve a singleton object bound to this zone

      Type Parameters

      • T

      Parameters

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

            • key: string

            Returns T

      Returns T

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

Type declaration

    • (label, options?): Zone
    • create a new Zone that can be passed to untrusted consumers without exposing the storage of the parent zone

      Parameters

      Returns Zone

Generated using TypeDoc