#How to list events and their metadata
1 messages · Page 1 of 1 (latest)
What kind of metadata do you have? Do you want type information?
The type information is not available at runtime
I was more thinking of the meta property, e.g.
ACCEPT: {
cond: 'isWorker',
actions: 'assignWorker',
meta: { hey: true },
target: 'PROCESS_PAYMENT',
},
Ah okay, so you want the transition objects then
For an individual state (the machine itself is a root state), that's under state.transitions
state.transitions's documentation says "The transition definitions that resulted in this state.", however I'd like to see all transition definitions (my bad for using the wrong word, apologies!) and not the one that resulted in this state, if that makes sense?
Yeah sorry for the confusion, I meant stateNode.transitions. For example:
const stateNode = machine.getStateNodeById('loading');
stateNode.transitions;