CommandKitPluginRuntime
CommandKitPluginRuntime
Represents the runtime environment for CommandKit plugins.
Signature
class CommandKitPluginRuntime {
    constructor(commandkit: CommandKit)
    getPlugins() => ;
    getPlugin(pluginName: string) => RuntimePlugin | null;
    get(plugin: T) => InstanceType<T> | null;
    preload(plugin: RuntimePlugin) => ;
    softRegisterPlugin(plugin: RuntimePlugin) => ;
    registerPlugin(plugin: RuntimePlugin) => ;
    unregisterPlugin(plugin: RuntimePlugin) => ;
    unregisterAllPlugins() => ;
    capture() => ;
    execute(f: AsyncFunction<[CommandKitPluginRuntime, RuntimePlugin], R | undefined>) => ;
}
constructor
method
(commandkit: CommandKit) => CommandKitPluginRuntimeCreates a new instance of CommandKitPluginRuntime.
getPlugins
method
() => Returns the plugins registered in this runtime.
getPlugin
method
(pluginName: string) => RuntimePlugin | nullChecks if there are no plugins registered in this runtime.
get
method
(plugin: T) => InstanceType<T> | nullFetches the given plugin
preload
method
(plugin: RuntimePlugin) => Pre-loads the specified entrypoints for the given plugin.
softRegisterPlugin
method
(plugin: RuntimePlugin) => Soft registers a plugin in the runtime.
registerPlugin
method
(plugin: RuntimePlugin) => Registers a plugin in the runtime.
unregisterPlugin
method
(plugin: RuntimePlugin) => Unregisters a plugin from the runtime.
unregisterAllPlugins
method
() => Unregisters all plugins from the runtime.
capture
method
() => Signals the runtime to allow the current plugin take ownership of the execution context.
execute
method
(f: AsyncFunction<[CommandKitPluginRuntime, RuntimePlugin], R | undefined>) => Executes a function for each plugin in the runtime.