@jetjs/core
class PluginRegistry
Methods
Method | Return | Description |
---|---|---|
getAlias(alias) | PluginAlias | |
getInstance() | PluginRegistry | |
getOrThrow(plugin, errorMessage) | PluginFactory | |
getPluginChain(alias) | PluginChainFactory | |
isAlias(alias) | boolean | |
isPluginChain(alias) | boolean | |
isRegistered(plugin) | boolean | |
register(name, fn) | void | |
registerAlias(alias, originalPlugin, defaultParameter) | void | |
registerPluginChain(alias, fn) | void |
Method Details
-
getAlias(alias) Method
Signature:getAlias(alias: PluginName): PluginAlias;
Returns:PluginAlias
Parameter Type Description alias PluginName
-
getInstance() Method
Signature:static getInstance(): PluginRegistry;
Returns:PluginRegistry
-
getOrThrow(plugin, errorMessage) Method
Signature:getOrThrow(plugin: PluginName, errorMessage?: string): PluginFactory<any, any, any>;
Returns:PluginFactory
Parameter Type Description plugin PluginName
errorMessage string
-
getPluginChain(alias) Method
Signature:getPluginChain(alias: PluginName): PluginChainFactory;
Returns:PluginChainFactory
Parameter Type Description alias PluginName
-
isAlias(alias) Method
Signature:isAlias(alias: PluginName): boolean;
Returns:boolean
Parameter Type Description alias PluginName
-
isPluginChain(alias) Method
Signature:isPluginChain(alias: PluginName): boolean;
Returns:boolean
Parameter Type Description alias PluginName
-
isRegistered(plugin) Method
Signature:isRegistered(plugin: PluginName): boolean;
Returns:boolean
Parameter Type Description plugin PluginName
-
register(name, fn) Method
Signature:register<T, E, O>(name: PluginName, fn: PluginFactory<T, E, O>): void;
Returns:void
Parameter Type Description name PluginName
fn PluginFactory
-
registerAlias(alias, originalPlugin, defaultParameter) Method
Define an alias for a given plugin with new default options
Signature:registerAlias(alias: PluginName, originalPlugin: PluginName, defaultParameter: PluginParameter): void;
Returns:void
Parameter Type Description alias PluginName
the alias to register
originalPlugin PluginName
the original plugin to wrap with an alias
defaultParameter PluginParameter
the new default parameter to use for the defined alias
-
registerPluginChain(alias, fn) Method
Signature:registerPluginChain(alias: PluginName, fn: PluginChainFactory): void;
Returns:void
Parameter Type Description alias PluginName
fn PluginChainFactory