Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Emitter

Hierarchy

  • Emitter

Index

Properties

Private _events

Methods

Private _emit

  • _emit(type: string, context: any, ...args: any[]): this

Private _emitAll

  • _emitAll(context: any, ...args: any[]): this

Private _on

cemit

  • cemit(type: string, context: any, ...args: any[]): this
  • Emit event with specifying a context.

    Parameters

    • type: string

      Event type to emit.

    • context: any

      Context to execute the callback.

    • Rest ...args: any[]

      Argument(s) in callback.

    Returns this

cemitAll

  • cemitAll(context: any, ...args: any[]): this
  • Emit all events with specifying a context.

    Parameters

    • context: any

      Context to execute the callback.

    • Rest ...args: any[]

      Argument(s) in callback.

    Returns this

clear

  • clear(type?: string): this
  • Remove events grouped event type.

    Parameters

    • Default value type: string = ""

      Event type to remove. If it is empty, removes all events.

    Returns this

emit

  • emit(type: string, ...args: any[]): this
  • Emit event.

    Parameters

    • type: string

      Event type to emit.

    • Rest ...args: any[]

      Argument(s) in callback.

    Returns this

emitAll

  • emitAll(...args: any[]): this
  • Emit all events.

    Parameters

    • Rest ...args: any[]

      Argument(s) in callback.

    Returns this

off

on

once

Generated using TypeDoc