Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ModuleLoaderInterface

Hierarchy

  • EventEmitter
    • ModuleLoaderInterface

Implemented by

Index

Methods

  • has(name: string): boolean
  • list(): Set<string>
  • eventNames(): (string | symbol)[]
  • Return an array listing the events for which the emitter has registered listeners.

    Returns (string | symbol)[]

  • listeners<T>(event: T): ((...args: any[]) => void)[]
  • Return the listeners registered for a given event.

    Type parameters

    • T: string | symbol

    Parameters

    • event: T

    Returns ((...args: any[]) => void)[]

  • listenerCount(event: string | symbol): number
  • Return the number of listeners listening to a given event.

    Parameters

    • event: string | symbol

    Returns number

  • emit<T>(event: T, ...args: any[]): boolean
  • Calls each of the listeners registered for a given event.

    Type parameters

    • T: string | symbol

    Parameters

    • event: T
    • Rest ...args: any[]

    Returns boolean

  • Add a listener for a given event.

    Type parameters

    • T: string | symbol

    Parameters

    • event: T
    • fn: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    Returns ModuleLoaderInterface

  • Type parameters

    • T: string | symbol

    Parameters

    • event: T
    • fn: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    Returns ModuleLoaderInterface

  • Add a one-time listener for a given event.

    Type parameters

    • T: string | symbol

    Parameters

    • event: T
    • fn: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    Returns ModuleLoaderInterface

  • removeListener<T>(event: T, fn?: (...args: any[]) => void, context?: any, once?: boolean): ModuleLoaderInterface
  • Remove the listeners of a given event.

    Type parameters

    • T: string | symbol

    Parameters

    • event: T
    • Optional fn: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any
    • Optional once: boolean

    Returns ModuleLoaderInterface

  • Type parameters

    • T: string | symbol

    Parameters

    • event: T
    • Optional fn: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any
    • Optional once: boolean

    Returns ModuleLoaderInterface

  • Remove all listeners, or those of the specified event.

    Parameters

    • Optional event: string | symbol

    Returns ModuleLoaderInterface

Generated using TypeDoc