Lens
Lens<
S,A> =object
Defined in: Core/Lens.ts:24
Lens<S, A> focuses on a single value A inside a structure S, providing a composable way to read and immutably update nested data.
A Lens always succeeds: the focused value is guaranteed to exist. For optional or indexed focuses, use Optional<S, A>.
Example
Section titled “Example”Type Parameters
Section titled “Type Parameters”S
A
Properties
Section titled “Properties”
readonlyget: (s) =>A
Defined in: Core/Lens.ts:25
Parameters
Section titled “Parameters”S
Returns
Section titled “Returns”A
readonlyset: (a) => (s) =>S
Defined in: Core/Lens.ts:26
Parameters
Section titled “Parameters”A
Returns
Section titled “Returns”(
s):S
Parameters
Section titled “Parameters”S
Returns
Section titled “Returns”S