Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EEObject

EventEmitterをmixinしたIDObject

Hierarchy

Implements

  • EventEmitter

Index

Constructors

constructor

Properties

addListener

addListener: function

Type declaration

    • (event: string | symbol, fn: ListenerFn, context?: any): this
    • Parameters

      • event: string | symbol
      • fn: ListenerFn
      • Optional context: any

      Returns this

emit

emit: function

Calls each of the listeners registered for a given event.

Type declaration

    • (event: string | symbol, ...args: Array<any>): boolean
    • Parameters

      • event: string | symbol
      • Rest ...args: Array<any>

      Returns boolean

eventNames

eventNames: function

Return an array listing the events for which the emitter has registered listeners.

Type declaration

    • (): Array<string | symbol>
    • Returns Array<string | symbol>

id

id: string

ID related to this instance to identify.

listeners

listeners: function & function

Return the listeners registered for a given event.

off

off: function

Type declaration

    • (event: string | symbol, fn?: ListenerFn, context?: any, once?: undefined | true | false): this
    • Parameters

      • event: string | symbol
      • Optional fn: ListenerFn
      • Optional context: any
      • Optional once: undefined | true | false

      Returns this

on

on: function

Add a listener for a given event.

Type declaration

    • (event: string | symbol, fn: ListenerFn, context?: any): this
    • Parameters

      • event: string | symbol
      • fn: ListenerFn
      • Optional context: any

      Returns this

once

once: function

Add a one-time listener for a given event.

Type declaration

    • (event: string | symbol, fn: ListenerFn, context?: any): this
    • Parameters

      • event: string | symbol
      • fn: ListenerFn
      • Optional context: any

      Returns this

removeAllListeners

removeAllListeners: function

Remove all listeners, or those of the specified event.

Type declaration

    • (event?: string | symbol): this
    • Parameters

      • Optional event: string | symbol

      Returns this

removeListener

removeListener: function

Remove the listeners of a given event.

Type declaration

    • (event: string | symbol, fn?: ListenerFn, context?: any, once?: undefined | true | false): this
    • Parameters

      • event: string | symbol
      • Optional fn: ListenerFn
      • Optional context: any
      • Optional once: undefined | true | false

      Returns this

Methods

getTypeName

  • getTypeName(): string

toString

  • toString(): string
  • Obtain stringfied object. If this method was not overridden, this method return class name.

    Returns string

    stringfied object

Static getUniqueRandom

  • getUniqueRandom(length: number): string

Generated using TypeDoc