sweet-monads
sweet-monads copied to clipboard
Added rust-like `unwrap()` for `Maybe` and `Either`
Why?
Better escape hatch than .value
Usage
function getUser(id: string): Either<UserError, User>;
const value = getUser(11).unwrap().name;
What else
- Fixed compiler and linter errors
Hi @AlexXanderGrib Thank you so much for this amazing PR. There are a few discussing points, but, anyway, it's so useful. Waiting for you response, and one more time, thank you a lot ^_^