The type for the application.
The service type, if the plugin provides
one.
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.
A function invoked to activate the plugin.
The provided service, or a promise to the service.
This function will be called whenever the plugin is manually activated, or when another plugin being activated requires the service it provides.
This function will not be called unless all of its required services can be fulfilled.
Optional
autoWhether the plugin should be activated on application start or waiting for being required. If the value is 'defer' then the plugin should be activated only after the application is started.
The default is false
.
Optional
deactivateA function invoked to deactivate the plugin.
The application PluginRegistry.application .
The services specified by the requires
property.
Optional
descriptionPlugin description.
This can be used to provide user documentation on the feature brought by a plugin.
Optional
optionalThe 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.
Optional
providesThe 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.
Optional
requiresThe 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.
A user-defined application plugin.