Methods
Static fallback
- fallback<T, U>(value: U): UnaryFn<T, Fallback<T, U>>
Type Parameters
T extends Break<any, any>
U
Parameters
Returns UnaryFn<T, Fallback<T, U>>
Static flip
- flip<T, U, V>(onSuccess?: U, onFailure?: V): UnaryFn<T, Flip<T, U, V>>
Type Parameters
T extends Break<any, any>
U extends boolean | Empty
V extends boolean | Empty
Parameters
Optional onSuccess: U
Optional onFailure: V
Returns UnaryFn<T, Flip<T, U, V>>
Static map
- map<T, U, V>(onSuccess?: U, onFailure?: V): UnaryFn<T, Map<T, U, V>>
Type Parameters
Parameters
Optional onSuccess: U
Optional onFailure: V
Returns UnaryFn<T, Map<T, U, V>>
Static tap
- tap<T>(onSuccess?: Empty | UnaryFn<SuccessType<T>, void>, onFailure?: Empty | UnaryFn<FailureType<T>, void>): UnaryFn<T, T>
Type Parameters
T extends Break<any, any>
Parameters
Optional onSuccess: Empty | UnaryFn<SuccessType<T>, void>
Optional onFailure: Empty | UnaryFn<FailureType<T>, void>
Returns UnaryFn<T, T>
Static transform
Type Parameters
T extends Break<any, any>
Parameters
Returns UnaryFn<T, Transform<T, U | V>>
For an input of a result or
null
, the returning function returns the result if notnull
, or a successful result ofvalue
ifnull
.