SignificanceEvent(sourceName, sourceType)

An event for comunicating between significance components

new SignificanceEvent(sourceName, sourceType)

Creates a new event to be sent over the significance bus

Parameters:
Name Type Description
sourceName string

The name of the source of the event.

sourceType string

The type of the source.

Extends

Members

allowedEventTypes

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

Overrides:

eventBus

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

Overrides:

sourceName

Returns a string representing the name of source of this event

Overrides:

sourceType

Returns a string that describe the source type of this event

Overrides:

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

Overrides:

toString() → {string}

Convert an event to a human-readable string

Returns:
string -

A string describing this event

Overrides: