Please apply Prettify to all XState Types #4791
Replies: 2 comments
-
Tbf, this is somewhat subjective. We are using this type in a couple of places already. I wouldn't use it on |
Beta Was this translation helpful? Give feedback.
-
I believe this would greatly improve DX. I'm starting to learn xstate and I am struggling to get any valuable feedback from my IDE because it's not telling me what things can go in what places. Even the generated API docs don't unravel the types in a helpful way either. There is so much prerequisite knowledge needed to truly utilize xstate to it's fullest potential, it's hard for me to imagine a reason why to not do it. Having the abstracted types unraveled, even if the output is long and unwieldy, would provide more value than not. The TS server often truncates outputs, and when it doesn't, there are tools to make it easier to read. |
Beta Was this translation helpful? Give feedback.
-
This magical type
Will take something like this
to be reported as this
Most of xstate's types are only good for validation and not any good for documentation. Please use the prettify function so when I am writing code, my IDE can tell me useful information about what can be assigned to different properties in machines and actors.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions