getOrElse
getOrElse<
E,A,B>(defaultValue): (data) =>A|B
Defined in: Core/Validation.ts:176
Returns the success value or a default value if the Validation is invalid.
The default can be a different type, widening the result to A | B.
Type Parameters
Section titled “Type Parameters”E
A
B
Parameters
Section titled “Parameters”defaultValue
Section titled “defaultValue”() => B
Returns
Section titled “Returns”(
data):A|B
Parameters
Section titled “Parameters”Validation<E, A>
Returns
Section titled “Returns”A | B