machina.js icon indicating copy to clipboard operation
machina.js copied to clipboard

Typo in README

Open sfrooster opened this issue 3 years ago • 3 comments

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 be newFsm (capital 'F'). A minor detail, but....

sfrooster avatar Dec 30 '21 04:12 sfrooster

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:

  • through the "eventListeners" property
  • by specifying a handler using the "on" property

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

sfrooster avatar Dec 30 '21 05:12 sfrooster

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.

ifandelse avatar Jan 02 '22 20:01 ifandelse

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: @.***>

sfrooster avatar Jan 03 '22 18:01 sfrooster