You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per documentation, the function given to flatMap is only invoked if the status is Ok. Hence, if the Result was already in an error state BEFORE R.flatMap is invoked, the state doesn't change.
While this is true at runtime, this is not how the type specification is implemented.
As per documentation, the function given to flatMap is only invoked if the status is
Ok
. Hence, if theResult
was already in an error state BEFORER.flatMap
is invoked, the state doesn't change.While this is true at runtime, this is not how the type specification is implemented.
For example:
The type of
test
should beResult<string, Error1 | Error2>
, but it isResult<string, Error2>
.The text was updated successfully, but these errors were encountered: