@yantrix/automata v0.2.0 • Docs
Yantrix API / @yantrix/automata / TEventBusTask
Type Alias: TEventBusTask<EventType, EventMetaType>
ts
type TEventBusTask<EventType, EventMetaType>: TAutomataEventMetaType<EventType, EventMetaType> & object;Represents a task that will be processed by the event bus after emitting a certain Event. Contains the ID of this task, as well as Promise for next events to be processed. Returning null as a result of handler makes it synchronous.
Type declaration
result
ts
result: Promise<TAutomataEventStack<EventType, EventMetaType>> | null;task_id
ts
task_id: string;Type Parameters
• EventType extends TAutomataBaseEventType
The type of the automata event.
• EventMetaType extends { [K in EventType]: any } = Record<EventType, any>
The type of the metadata associated with each event.