mattpocock / xstate-codegen

A codegen tool for 100% TS type-safety in XState
MIT License
245 stars 12 forks source link

passing options to `send` doesn't appear to work #45

Closed mwarger closed 3 years ago

mwarger commented 3 years ago

I tried to pass a { delay } option to an event and I get type errors.

mattpocock commented 3 years ago

@mwarger Which usage is this? When you're calling service.send() after the service has been started? Or using the 'send' action in a machine declaration?

mwarger commented 3 years ago

This was the send function within a component.

mattpocock commented 3 years ago

Could you send enough to do a full repro? Hard to work out what's going on from that.

The send action works off the Event generic you pass to Machine<Context, Event>(), if that's any help.

mwarger commented 3 years ago

I think I misunderstood this. I wasn't using this as an action creator.