EventBase()

Abstract base class for all the types of events

new EventBase()

Abstract constructor. Detects errors in derived classes.

Members

allowedEventTypes

Returns a Set of strings that describe the valid types of events

eventBus

Returns a EventEmitter that will be used for the global event bus

sourceName

Returns a string representing the name of source of this event

sourceType

Returns a string that describe the source type of this event

Methods

async emit(type, …data) → {Promise.<boolean>}

Emits the event on the specified event bus

Parameters:
Name Type Attributes Description
type string

The type of the event

data object <repeatable>

The optional data associated with the event

Returns:
Promise.<boolean> -

Returns a Promise resolving to true if the event had listeners, false otherwise

toString() → {string}

Convert an event to a human-readable string

Returns:
string -

A string describing this event