Closed mattpocock closed 3 years ago
Thanks, I have also run into this.
I have also tried using the spawn
to pass a service to children as in this example: https://codesandbox.io/s/xstate-todomvc-33wr94qv1?from-embed=&file=/todoMachine.js
It seems like the service or machine is not necessarily typed, as the "sub-machine" matches function is not typed strongly. I'm not sure if this is related to what you're alluding to.
Yes, that's a good example of something that would be strongly typed if we fixed this.
machine.withConfig()
is not strongly typed, meaning that it's very difficult to get nice typings when usinginterpret
.