@jetjs/core

class PluginRegistry

Methods

MethodReturnDescription
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
    ParameterTypeDescription
    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
    ParameterTypeDescription
    plugin
    PluginName
    errorMessage
    string
  • getPluginChain(alias) Method

    Signature:
    getPluginChain(alias: PluginName): PluginChainFactory;
    Returns:
    PluginChainFactory
    ParameterTypeDescription
    alias
    PluginName
  • isAlias(alias) Method

    Signature:
    isAlias(alias: PluginName): boolean;
    Returns:
    boolean
    ParameterTypeDescription
    alias
    PluginName
  • isPluginChain(alias) Method

    Signature:
    isPluginChain(alias: PluginName): boolean;
    Returns:
    boolean
    ParameterTypeDescription
    alias
    PluginName
  • isRegistered(plugin) Method

    Signature:
    isRegistered(plugin: PluginName): boolean;
    Returns:
    boolean
    ParameterTypeDescription
    plugin
    PluginName
  • register(name, fn) Method

    Signature:
    register<T, E, O>(name: PluginName, fn: PluginFactory<T, E, O>): void;
    Returns:
    void
    ParameterTypeDescription
    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
    ParameterTypeDescription
    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
    ParameterTypeDescription
    alias
    PluginName
    fn
    PluginChainFactory