Skip to content

@yantrix/automata v0.5.2 • Docs


Yantrix API / @yantrix/automata / BasicEventDictionary

Class: BasicEventDictionary ​

Basic event dictionary class that's used in Yantrix automatas.

Extends ​

  • AbstractEventDictionary<number, Record<number, any>, typeof AbstractBaseClass, this> & AbstractBaseClass<this>

Implements ​

Methods ​

addEvents() ​

ts
addEvents(obj): number[]

Add new Events to the dictionary, possibly scope them to namespace

Parameters ​

• obj: TEventKeysCollection<number>

object with list of keys to get events from and associated namespace

Returns ​

number[]

Array of added events

Implementation of ​

IEventDictionary.addEvents

Inherited from ​

createEventDictionary<TAutomataBaseEventType, Record<TAutomataBaseEventType, any>>()(AbstractBaseClass).addEvents


clearEvents() ​

ts
clearEvents(namespace?): this

remove all Events from the Dictionary, possibly scoping them to namespace.

Parameters ​

• namespace?: string

Returns ​

this

dictionary

Implementation of ​

IEventDictionary.clearEvents

Inherited from ​

createEventDictionary<TAutomataBaseEventType, Record<TAutomataBaseEventType, any>>()(AbstractBaseClass).clearEvents


getEventKeys() ​

ts
getEventKeys(obj): (null | string)[]

Get Keys of selected Events, possibly scoped to namespace

Parameters ​

• obj: TEventValuesCollection<number>

object with list of events to get keys for and associated namespace

Returns ​

(null | string)[]

Array of event keys

Implementation of ​

IEventDictionary.getEventKeys

Inherited from ​

createEventDictionary<TAutomataBaseEventType, Record<TAutomataBaseEventType, any>>()(AbstractBaseClass).getEventKeys


getEventValues() ​

ts
getEventValues(obj): (null | number)[]

Get all Events for selected Keys, possibly scoped to namespace

Parameters ​

• obj: TEventKeysCollection<number>

object with list of keys to get events from and associated namespace

Returns ​

(null | number)[]

Array of event values

Implementation of ​

IEventDictionary.getEventValues

Inherited from ​

createEventDictionary<TAutomataBaseEventType, Record<TAutomataBaseEventType, any>>()(AbstractBaseClass).getEventValues


removeEvents() ​

ts
removeEvents(obj): this

remove Events from the Dictionary, possibly scoping them to namespace.

Parameters ​

• obj: Partial<TEventKeysCollection<number> & TEventValuesCollection<number>>

object with namespace, list of events/keys to delete

Returns ​

this

dictionary

Implementation of ​

IEventDictionary.removeEvents

Inherited from ​

createEventDictionary<TAutomataBaseEventType, Record<TAutomataBaseEventType, any>>()(AbstractBaseClass).removeEvents