- Notifications
You must be signed in to change notification settings - Fork928
Description
As a developer, I want my XState machines to be easy to write and strongly typed, so I can code quickly and have fewer bugs.
XState typegen reduces the amount of boilerplate needed while increasing type safety by generating lots of type information for you. It can runs automatically if you have the XState VSCode plugin installed, but there is also a CLI which#435 will add a script for, so you can run it withyarn typegen
. However, it's important that the generated types stay up to date, so we should have CI run typegen before checking for TypeScript errors.
Additionally, typegen is not working correctly in#435 and I'm still having to use some boilerplate. I'm breaking this ticket out in the interest of reducing conflicts by holding onto that PR for too long. I've asked for help on the Stately Discord and was asked to make a repro so this ticket entails:
- make a sandbox and try to reproduce my typegen errors
- debug
- add a CI job