Learning & using Typescript has been like learning Sass: A cool extension to a language I already know, and whose features I discover a bit more of each time I use it. So I actually didn't know about the tuple type, thanks for pointing that out!
As for isLeft, I want to say that I saw that signature / pattern while I was researching discriminated unions and somehow thought it was required. Again, thanks for the tip.
you can see that person is just starting with typescript by amount of any in their code :) I was curious with idea though (because I come from language with pattern matching and I miss it) so I played with your code a bit and tried few ways of implementing it gist.github.com/JLarky/914006843b4...
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.
Learning & using Typescript has been like learning Sass: A cool extension to a language I already know, and whose features I discover a bit more of each time I use it. So I actually didn't know about the tuple type, thanks for pointing that out!
As for isLeft, I want to say that I saw that signature / pattern while I was researching discriminated unions and somehow thought it was required. Again, thanks for the tip.
you can see that person is just starting with typescript by amount of
any
in their code :) I was curious with idea though (because I come from language with pattern matching and I miss it) so I played with your code a bit and tried few ways of implementing it gist.github.com/JLarky/914006843b4...