unwrapSomeOrElse<T, U>(option: Option<T>, fallback: (() => U)): T | U
Unwraps the value of an Option of type T
or returns a custom fallback value.
If the option is a Some, it returns its value,
Otherwise, it returns the return value of the provided fallback callback.
Unwraps the value of an Option of type
T
or returns a custom fallback value. If the option is a Some, it returns its value, Otherwise, it returns the return value of the provided fallback callback.Deprecated
Use unwrapOption instead.