Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IEvents<IEventsList>

Type parameters

  • IEventsList

Hierarchy

Indexable

[key: string]: any

Index

Properties

Methods

Properties

destroy

destroy: function

Delte all linstening events.

Type declaration

    • (): void
    • Returns void

emitter

emitter: EventEmitter

Native nodejs EventEmitter.

Methods

emit

  • emit<IE>(eventName: IE, data: IEventsList[IE]): this
  • Emit event with custom data and "emit" event with data { eventName: string, data: any }

    Type parameters

    • IE: keyof IEventsList

    Parameters

    • eventName: IE
    • data: IEventsList[IE]

    Returns this

off

  • off<IE>(eventName: IE, listener: function): this
  • Removes the specified listener from the listener array for the event named eventName.

    Type parameters

    • IE: keyof IEventsList

    Parameters

    • eventName: IE
    • listener: function
        • (data: IEventsList[IE]): void
        • Parameters

          • data: IEventsList[IE]

          Returns void

    Returns this

on

  • on<IE>(eventName: IE, listener: function): this
  • Adds the listener export function to the end of the listeners array for the event named eventName.

    Type parameters

    • IE: keyof IEventsList

    Parameters

    • eventName: IE
    • listener: function
        • (data: IEventsList[IE]): void
        • Parameters

          • data: IEventsList[IE]

          Returns void

    Returns this

once

  • once<IE>(eventName: IE, listener: function): this
  • Adds a one-time listener export function for the event named eventName.

    Type parameters

    • IE: keyof IEventsList

    Parameters

    • eventName: IE
    • listener: function
        • (data: IEventsList[IE]): void
        • Parameters

          • data: IEventsList[IE]

          Returns void

    Returns this

Generated using TypeDoc