Callback function
Apply the provided callback function for unsuccessful result.
Callback function
Get the wrapped value in the Result
.
try {
const value = result.get();
} catch (e) {
// handle Failure
}
the wrapped value
Transform the wrapped "ok" value to a new value.
Transforming the wrapped value
Transform the wrapped "err" to a new error.
Transforming the wrapped error
Pattern match on successful case or failure case.
Object containing callback function for when result is ok or err
Create an Result
from a failure value.
Transform a function to Result
.
Result.of(() => {
return throwableFn();
});
Throwable function which can throw or return an value
Create an Result
from an "ok" value.
Generated using TypeDoc
Apply the provided callback function for successful result.