Replies: 5 comments 8 replies
-
I'm not necessarily in favour of this change, but I would say that less polymorphism makes type errors more readable. |
Beta Was this translation helpful? Give feedback.
-
These things can (and in my opinion, should) be covered by some sort of ESLint plugin. |
Beta Was this translation helpful? Give feedback.
-
I think it's important to note that the problem isn't necessarily that these things are possible, but that they are documented. So an eslint ruleset wouldn't help too much by itself. I need the documentation to be simplified and consistent. |
Beta Was this translation helpful? Give feedback.
-
Noting some additional examples that could use some consistency in the docs:
|
Beta Was this translation helpful? Give feedback.
-
#2 - I definitely would not want to be forced to use:
instead of:
It's common to have many simple transitions like this. DX is subjective but it definitely includes shortcuts for frequent operations. |
Beta Was this translation helpful? Give feedback.
-
Let's limit the amount of polymorphism in the API and add some helpers for common mistakes.
My proposals:
interpreter.send()
only takesevent: TEvent extends EventObject
. It no longer takesTType | Array<TType> | { type: TType } | Array<{ type: TType }>
string
state target. Now they only take objects, so the minimum way to write an event with a target is:assign()
. Leave only:Beta Was this translation helpful? Give feedback.
All reactions