Skip to content

Get type T of possible states to pass onto state.matches(T) #3824

Answered by JRebella
JRebella asked this question in Q&A
Discussion options

You must be logged in to vote

If anyone's needing this, I ended up using one of the properties from the typegen:

export type MyMachineState = import('./machine.typegen').Typegen0['matchesStates'];

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sbkl
Comment options

@JRebella
Comment options

Answer selected by JRebella
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants