Open sfrooster opened 2 years ago
Immediately after submitting this, I realized I hadn't reported the issue quite right. At either the top "machina" level or within a B/Fsm, there are two ways to designate a handler for an emitted event:
Looking at things now, it appears the code is expecting the to "machina" level to emit newfsm
and it's only machina.eventListeners
which is set to expect newFsm
Thanks for giving me a heads up on this @sfrooster. I've been working on an updated machina repo (in another branch) as well as a full replacement for the docs branch, and I'll look at getting this fixed (initially w/o breaking backwards compat) as part of that.
I came across it while working on typescript type definitions to submit to DefinitelyTyped. Should I hold-off on that?
On Sun, Jan 2, 2022, 12:06 PM Jim Cowart @.***> wrote:
Thanks for giving me a heads up on this @sfrooster https://github.com/sfrooster. I've been working on an updated machina repo (in another branch) as well as a full replacement for the docs branch, and I'll look at getting this fixed (initially w/o breaking backwards compat) as part of that.
— Reply to this email directly, view it on GitHub https://github.com/ifandelse/machina.js/issues/171#issuecomment-1003768032, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAX27F3BN27G2PYCLUOYTZDUUCV4JANCNFSM5K7CQHOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
I'll submit a PR if no one gets to this before I do.
This page - and possibly others - indicate the "New FSM" event emitted by the top-level "machina" has an event name of
newfsm
(all lower-case), but the code shows the actual event name to benewFsm
(capital 'F'). A minor detail, but....