Pass event type to reduce
jamesopstad opened this issue · comments
James Opstad commented
Thanks for the great library. An issue I'm having using it in Typescript is that the event type in ReduceFunction
is always unknown. What do think about adding an additional type argument so that the event type can be set as well as the context type? I think it makes sense to also add this to ContextFunction
, GuardFunction
, ActionFunction
and transition
.
Matthew Phillips commented
Yep! I don't do much typescript, but will happily accept a PR to change the typings file.