Comment

Comment by lacampbell

Plus, JS/TS already have proper union types without a need for a construct like Either.

I disagree - what if on success it returns a string representing some data, and on failure it returns a string detailing the error? A `string | string` return type is not very useful, while an `Either<string, string>` is IMO.

parent lacampbell 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton