A function invoked to activate the plugin.
Whether the plugin should be activated on application start.
The default is false
.
The human readable id of the plugin.
This must be unique within an application.
The types of optional services for the plugin, if any.
These tokens correspond to the services that can be used by the plugin if available, but are not necessarily required.
The optional services will be passed to the activate()
function
following all required services. If an optional service cannot be
resolved, null
will be passed in its place.
The type of service provided by the plugin, if any.
This token corresponds to the service exported by the plugin.
When the plugin is activated, the return value of activate()
is used as the concrete instance of the type.
The types of required services for the plugin, if any.
These tokens correspond to the services that are required by the plugin for correct operation.
When the plugin is activated, a concrete instance of each type
will be passed to the activate()
function, in the order they
are specified in the requires
array.
Generated using TypeDoc
A user-defined application plugin.
Notes
Plugins are the foundation for building an extensible application.
Plugins consume and provide "services", which are nothing more than concrete implementations of interfaces and/or abstract types.
Unlike regular imports and exports, which tie the service consumer to a particular implementation of the service, plugins decouple the service producer from the service consumer, allowing an application to be easily customized by third parties in a type-safe fashion.