Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EventMappingImpl

Event mappings class used to describe single event name to listener mapping.

author

Jānis Radiņš

Hierarchy

  • EventMappingImpl

Implements

Index

Constructors

constructor

Properties

context

context: Object

Listener scope to apply as it is executed

event

event: string

String event name.

id

id: number = EventMappingImpl.EVENT_MAPPING_ID++

Unique id of a mapping.

returns

listener

listener: EventListener

Listener function.

Accessors

executeOnce

  • get executeOnce(): boolean

Methods

executionAllowedByGuards

  • executionAllowedByGuards(event: Event): boolean

once

  • once(): this

withGuards

  • Set event guards which could prevent event listener to be executed upon some circumstances known only to guards themselves.

    Parameters

    • Rest ...guards: EventGuard[]

      List of EventGuard callback methods that might prevent execution of listener.

    Returns this

    so we can call other methods of this class instantly from return value