Extensible variants are fun indeed 🙂 the technique I suggested with polyvariants will warn about typos though because of the way the function is defined with the polyvariant value being the function parameter. Its type is inferred as [< `arrowDown | `arrowLeft], so a typo like `arrowDonw will give the same kind of type error as I show in the post.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Extensible variants are fun indeed 🙂 the technique I suggested with polyvariants will warn about typos though because of the way the function is defined with the polyvariant value being the function parameter. Its type is inferred as
[< `arrowDown | `arrowLeft], so a typo like`arrowDonwwill give the same kind of type error as I show in the post.