- Preparing search index...
- The search index is not available
monument
- PathLens<T>(): (<Path>(...path: Path) => Lens<T, DeepType<T, Path>>)
-
Returns (<Path>(...path: Path) => Lens<T, DeepType<T, Path>>)
-
- <Path>(...path: Path): Lens<T, DeepType<T, Path>>
-
Type Parameters
-
Path extends [keyof T] | [keyof T, ...DeepKeys<any[any]>[]]
Returns Lens<T, DeepType<T, Path>>
Creates a lens for a nested property.
Returns
A lens to the nested property.
Example
Given a data model:
Create a lens to a nested property:
Use "get" function to get a value of the nested property:
Use "set" function to set a value of the nested property:
Use "over" function to map and set a value of the nested property: