I need to notify a parent state machine when something happens in a child machine when its context is changed. Using sendParent (which I know isn't preferred because it is vaguely typed) was my idea, but several machines need to do this in my app. I tried extracting a sendParent action to a shared actions module, but I'm running into typing issues when I try to use it in my machines, because sendParent doesn't have a reference to the types in the machine it is being used in
Does anyone know how I could extract sendParent into a module and have it be used in multiple machines?
Besides the DRY principle, I'm also following Sandro's blog about organizing a machine's code
Thanks for any insights!