Optional
Optional<
S,A> =object
Defined in: Core/Optional.ts:27
Optional<S, A> focuses on a value A inside a structure S that may or may not be present. Like a Lens, but get returns Option.
Compose with other Optionals via andThen, or with a Lens via andThenLens.
Convert a Lens to an Optional with Lens.toOptional.
Type Parameters
Section titled “Type Parameters”S
A
Properties
Section titled “Properties”
readonlyget: (s) =>Option<A>
Defined in: Core/Optional.ts:28
Parameters
Section titled “Parameters”S
Returns
Section titled “Returns”Option<A>
readonlyset: (a) => (s) =>S
Defined in: Core/Optional.ts:29
Parameters
Section titled “Parameters”A
Returns
Section titled “Returns”(
s):S
Parameters
Section titled “Parameters”S
Returns
Section titled “Returns”S