Methods

  • Gets a plugin by name.

    Type Parameters

    Parameters

    • pName: string

      String name of the plugin to retrieve.

    Returns undefined | T

  • Lists all registered plugins.

    Returns string[]

  • Initialize the Kit class with plugins.

    Type Parameters

    • T = any

    Parameters

    Returns void

    Use registerPlugin instead.

  • Removes an event listener.

    Parameters

    • pPluginName: string

      The plugin namespace.

    • pEventName: string

      The event name.

    • pListener: Listener

      The listener to remove.

    Returns void

  • Listen for an event.

    Parameters

    • pPluginName: string

      The plugin namespace.

    • pEventName: string

      The event name.

    • pListener: Listener

      The listener to call when the event is emitted.

    Returns void

  • Register a plugin with the Kit class. Accepts a plugin constructor (with optional constructor arguments), an instantiated plugin instance, or an array of plugins.

    Type Parameters

    Parameters

    • pPlugin: C

      The plugin constructor, plugin instance, or array of plugins to register.

    • ...args: ConstructorParameters<C>

      Optional arguments passed to the plugin constructor when instantiating.

    Returns T

  • Register a plugin with the Kit class. Accepts a plugin constructor (with optional constructor arguments), an instantiated plugin instance, or an array of plugins.

    Type Parameters

    • T extends object

    Parameters

    • pPlugin: T

      The plugin constructor, plugin instance, or array of plugins to register.

    Returns T

  • Register a plugin with the Kit class. Accepts a plugin constructor (with optional constructor arguments), an instantiated plugin instance, or an array of plugins.

    Type Parameters

    • T

    Parameters

    • pPlugin: (T | KitPluginConstructor<T, any[]>)[]

      The plugin constructor, plugin instance, or array of plugins to register.

    Returns T[]

  • Register a plugin with the Kit class. Accepts a plugin constructor (with optional constructor arguments), an instantiated plugin instance, or an array of plugins.

    Type Parameters

    • T

    Parameters

    • pPlugin: T | KitPluginConstructor<T, any[]>

      The plugin constructor, plugin instance, or array of plugins to register.

    Returns T

  • Sets the resources found in resources and preloads all interfaces found.

    Parameters

    Returns Promise<void>