Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • Returns Emitter

Methods

cemit

  • cemit(type: string, context: any, ...args: any[]): Emitter
  • 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 Emitter

cemitAll

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

    Parameters

    • context: any

      Context to execute the callback.

    • Rest ...args: any[]

      Argument(s) in callback.

    Returns Emitter

clear

  • Remove events grouped event type.

    Parameters

    • Optional type: string

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

    Returns Emitter

emit

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

    Parameters

    • type: string

      Event type to emit.

    • Rest ...args: any[]

      Argument(s) in callback.

    Returns Emitter

emitAll

  • Emit all events.

    Parameters

    • Rest ...args: any[]

      Argument(s) in callback.

    Returns Emitter

off

  • off(type: string, callback: IEmitterDelegate): Emitter
  • Unregister event.

    Parameters

    • type: string

      Event type.

    • callback: IEmitterDelegate

      Registered callback.

    Returns Emitter

on

  • on(type: string, callback: IEmitterDelegate): Emitter
  • Register event.

    Parameters

    • type: string

      Event type.

    • callback: IEmitterDelegate

      Callback when the event fires.

    Returns Emitter

once

  • once(type: string, callback: IEmitterDelegate): Emitter
  • Register one-time event.

    Parameters

    • type: string

      Event type.

    • callback: IEmitterDelegate

      Callback when the event fires.

    Returns Emitter

Generated using TypeDoc