Static
fallbackStatic
flipAllows to optionally convert an input successful result into a
failed result with the same data
, and vice-versa.
Static
mapStatic
tapAllows for the execution of side effects upon a successful or failed result.
Optional
onSuccess: Empty | UnaryFn<SuccessType<T>>Optional
onFailure: Empty | UnaryFn<FailureType<T>>Static
transformMaps a result to their data
, with optional
remaps for data
upon a successful and/or failed result.
Optional
onSuccess: Empty | UnaryFn<SuccessType<T>, U>Optional
onFailure: Empty | UnaryFn<FailureType<T>, V>
For an input of a result or
null
, the returning function returns the result if notnull
, or a successful result ofvalue
ifnull
.