mattpocock / xstate-codegen

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

Fixed withConfig and interpret #39

Closed mattpocock closed 3 years ago

mattpocock commented 3 years ago

Fixes #31 and fixes #32

Some notes: I couldn't get it to be strongly typed - I could only make it a partial of the options that the machine can receive. This is because we are inheriting from the XState StateNode class, and I can't override it to be stricter than what withConfig can by default receive. Open to ideas here.

I'm also not sure whether we actually want withConfig to be strongly typed so all pieces of it are required, since it's by definition composable.

changeset-bot[bot] commented 3 years ago

🦋 Changeset is good to go

Latest commit: 93816ee1418543d45e0c969e75f10558d97ffd64

We got this.

This PR includes changesets to release 1 package | Name | Type | | -------------- | ----- | | xstate-codegen | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR