mattpocock / xstate-codegen

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

Add failing example for choose action #63

Closed Silverwolf90 closed 3 years ago

Silverwolf90 commented 3 years ago

As mentioned in https://github.com/mattpocock/xstate-codegen/issues/61 here is an example of the choose action.

In the guards we see this error:

Object literal may only specify known properties, but 'guardA' does not exist in type 'Partial<{ guardC?: ((context: Context, event: { type: "ANOTHER_EVENT"; }) => boolean) | undefined; }>'. Did you mean to write 'guardC'?

And in the the actions we see a similar error:

Object literal may only specify known properties, but 'actionA' does not exist in type 'Partial<{ actionD?: ActionObject<Context, { type: "ANOTHER_EVENT"; }> | ActionFunction<Context, { type: "ANOTHER_EVENT"; }> | undefined; }>'. Did you mean to write 'actionD'?
changeset-bot[bot] commented 3 years ago

⚠️ No Changeset found

Latest commit: 7a406562952a1c7ae6ff034abcba284de27e8e64

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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