Class Commands

Hierarchy

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(options?: any): Commands

Parameters

  • options?: any optional

Returns

Commands

Properties

public options: any

public storageType: CommandStorage

Methods

public bind(eventName: string, callback: Function, context?: any): any

Parameters

  • eventName: string
  • callback: Function
  • context?: any optional

Returns

any

public execute(name: string, args?: Array<any>): any

Parameters

  • name: string
  • args?: Array<any> optional

Returns

any

public getHandler(name: string): Function

Parameters

  • name: string

Returns

Function

public hasHandler(name: string): boolean

Parameters

  • name: string

Returns

boolean

public listenTo(object: any, events: string, callback: Function): any

Parameters

  • object: any
  • events: string
  • callback: Function

Returns

any

public listenToOnce(object: any, events: string, callback: Function): any

Parameters

  • object: any
  • events: string
  • callback: Function

Returns

any

public off(eventName?: string, callback?: Function, context?: any): any

Parameters

  • eventName?: string optional
  • callback?: Function optional
  • context?: any optional

Returns

any

public on(eventName: string, callback?: Function, context?: any): any

Parameters

  • eventName: string
  • callback?: Function optional
  • context?: any optional

Returns

any

public once(events: string, callback: Function, context?: any): any

Parameters

  • events: string
  • callback: Function
  • context?: any optional

Returns

any

public removeAllHandlers()

public removeHandler(name: string): any

Parameters

  • name: string

Returns

any

public setHandler(name: string, handler: any, context: any)

Parameters

  • name: string
  • handler: any
  • context: any

public stopListening(object?: any, events?: string, callback?: Function): any

Parameters

  • object?: any optional
  • events?: string optional
  • callback?: Function optional

Returns

any

public trigger(eventName: string, args?: Array<any>): any

Parameters

  • eventName: string
  • args?: Array<any> optional

Returns

any

public unbind(eventName?: string, callback?: Function, context?: any): any

Parameters

  • eventName?: string optional
  • callback?: Function optional
  • context?: any optional

Returns

any