loading...

re: Data Validation in Typescript Using the Either Pattern VIEW POST

TOP OF THREAD FULL DISCUSSION
re: It seems that you know Haskell but don't have too much experience with typescript :) like why would isLeft be defined on any instead of on Either&l...
 

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...

Code of Conduct Report abuse