Skip to content

How to extract invoke call into it's own TypeSafe method #5240

Answered by davidkpiano
CodenameLiam asked this question in Q&A
Discussion options

You must be logged in to vote

There is currently no helper function for XState that does this, but it is possible in userland.

The type you want is InvokeConfig:

InvokeConfig<
  TContext,
  TEvent,
  TActor,
  TAction,
  TGuard,
  TDelay,
  TEmitted,
  TMeta
>

Not all the type parameters are needed, depending on your use-case.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by CodenameLiam
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