@dxos/app-framework - v0.8.2
    Preparing search index...

    Class PluginContext

    Facilitates the dependency injection between plugin modules by allowing them contribute and request capabilities from each other. It tracks the capabilities that are contributed in an in-memory live object. This allows the application to subscribe to this state and incorporate plugins which are added dynamically.

    Index

    Constructors

    Properties

    _capabilities: (arg: string) => Rx = ...
    _capability: (arg: string) => Rx = ...
    activate: (event: ActivationEvent) => Effect<boolean, Error>

    Activates plugins based on the activation event.

    Type declaration

      • (event: ActivationEvent): Effect<boolean, Error>
      • Parameters

        Returns Effect<boolean, Error>

        Whether the activation was successful.

    reset: (event: ActivationEvent) => Effect<boolean, Error>

    Re-activates the modules that were activated by the event.

    Type declaration

      • (event: ActivationEvent): Effect<boolean, Error>
      • Parameters

        Returns Effect<boolean, Error>

        Whether the reset was successful.

    Methods

    • Get the Rx reference to the available capabilities for a given interface. Primarily useful for deriving other Rx values based on the capabilities or for subscribing to changes in the capabilities.

      Type Parameters

      • T

      Parameters

      Returns Rx<T[]>

      An Rx reference to the available capabilities.

    • Get the Rx reference to the available capabilities for a given interface. Primarily useful for deriving other Rx values based on the capability or for subscribing to changes in the capability.

      Type Parameters

      • T

      Parameters

      Returns Rx<T>

      An Rx reference to the available capability.

      If no capability is found.