Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TcEvent

Main Event Class of the tc-context library. Every event raised from the tc-context library derives from this Class.

TcEvent when emitted through the TcEmitter will propagate, and if propagation is not needed, an explicit call to TcEvent.stopPropagation() must be made.

The TcEventcontains the timestamp of event creation, any associated data with the event and the TcContext from which the event originated.

Hierarchy

Index

Constructors

constructor

  • Construct a base TcEventwith references to the TcContext and data

    Parameters

    • context: TcContext

      The TcContext from which the event originated

    • Optional data: any

      Any data associated with the event

    Returns TcEvent

Accessors

context

data

  • get data(): any | undefined
  • Access any Data, which is associated with the event

    Returns any | undefined

propagationStopped

  • get propagationStopped(): boolean

timestamp

  • get timestamp(): number

Methods

stopPropagation

  • stopPropagation(): void
  • Stop the propagation of the event, up the TcEmitter tree

    Returns void

Generated using TypeDoc