Transforms the success value.
If the inner result is Err, fn is not called.
Transforms the error value.
If the inner result is Ok, fn is not called.
StaticfromWraps a Promise<T> into a ResultAsync<T, E>.
If the promise rejects, onError maps the rejection reason to E.
Staticfrom
A
PromiseLike<Result<T, E>>that is directlyawait-able and supports chainablemap / mapErr / andThenoperators.Example