fold
fold<
A,B>(onNone,onSome): (data) =>B
Defined in: Core/Option.ts:164
Extracts the value from a Option by providing handlers for both cases.
Type Parameters
Section titled “Type Parameters”A
B
Parameters
Section titled “Parameters”onNone
Section titled “onNone”() => B
onSome
Section titled “onSome”(a) => B
Returns
Section titled “Returns”(
data):B
Parameters
Section titled “Parameters”Option<A>
Returns
Section titled “Returns”B