Closed AlexXanderGrib closed 1 year ago
error factories cannot return unknown
if the are to be error factories… thatʼs for sure! 😅
@konradekk IMHO this is fine since there is not requirement in JS that only instances of Error
can be thrown. Literally anything can be thrown.
well… true! 😁 (not sure if everything should be thrown, though!)
(btw. minor issue: it seems that errorFactory
signature needs an update)
I added this method and some other ones into my implementation. I will not create a pr, cause i think that @JSMonk can't review and merge it now
https://gist.github.com/AlexXanderGrib/cb2d1de3a729b63b95588bccbb47aa8f
@AlexXanderGrib I came back, so, you are welcome for the PR ^_^
Also, I'm thinking about this whole assert
and expect
story and wonder if it might be better to add an extra package for monad assertions?
This is already done. Can we close it?
Also, I'm thinking about this whole assert and expect story and wonder if it might be better to add an extra package for monad assertions?
What that package would do?
Just provide the API for assertions for any monad implementation
Why?
For providing more helpful messages.
Other implementations:
result.expect()
For
Either
:For
Maybe
: