ChainGraph API Documentation / @badaitech/chaingraph-types / newEvent
Function: newEvent()
newEvent<
T>(index,flowId,type,data):FlowEvent<T>
Defined in: packages/chaingraph-types/src/flow/events.ts:236
Helper function to create new flow events with proper typing
Type Parameters
T
T extends FlowEventType
Parameters
index
number
flowId
string
type
T
data
EventDataMap[T]
Returns
FlowEvent<T>