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

    Interface PluginModule

    A unit of containment of modular functionality that can be provided to an application. Activation of a module is async allowing for code to split and loaded lazily.

    interface PluginModule {
        "[PluginModuleTypeId]": typeof Plugin.PluginModuleTypeId;
        activate: (
            props?: any,
        ) => Effect<ModuleReturn, Error, Capability.Service | Plugin.Service>;
        activatesOn: Events;
        firesAfterActivation?: ActivationEvent.ActivationEvent[];
        firesBeforeActivation?: ActivationEvent.ActivationEvent[];
        id: string;
    }
    Index

    Properties

    "[PluginModuleTypeId]": typeof Plugin.PluginModuleTypeId
    activate: (
        props?: any,
    ) => Effect<ModuleReturn, Error, Capability.Service | Plugin.Service>

    Called when the module is activated. CapabilityManager is accessed via the Effect layer system (Capability.Service). PluginManager is accessed via Plugin.Service.

    Type declaration

    activatesOn: Events

    Events for which the module will be activated.

    firesAfterActivation?: ActivationEvent.ActivationEvent[]

    Events that this module fires after its own activation completes.

    Once this module's activate body has finished executing, the plugin manager activates every event listed here, causing any modules listening on those events to run. These events are fired by the framework on this module's behalf as part of this module's lifecycle.

    Read as: "this module fires these events after [its] activation".

    firesBeforeActivation?: ActivationEvent.ActivationEvent[]

    Events that this module fires before its own activation runs.

    When this module is asked to activate (via activatesOn), the plugin manager first activates every event listed here, ensuring any other modules that contribute to those events have completed before this module's activate body executes. These events are fired by the framework on this module's behalf — the module does not need to wait for some other code to fire them.

    The module is marked as needing reset if a module activated by one of these events is later removed.

    Read as: "this module fires these events before [its] activation".

    id: string

    Unique id of the module.