Interface: Lens<Source>
Lens.Lens
Type parameters
Name | Type |
---|---|
Source | extends Flattenable |
Callable
Lens
▸ Lens<Path
>(path
): Get
<Source
, Path
>
Creates a wrapper for a given Source
type that provides access to both get
and set
functionalities for it,
effectively creating a functional lens.
Type parameters
Name | Type |
---|---|
Path | extends string | number | symbol |
Parameters
Name | Type |
---|---|
path | Path |
Returns
Get
<Source
, Path
>
Lens
▸ Lens<Path
, Value
>(path
, value
): Set
<Source
, Path
, Value
>
Creates a wrapper for a given Source
type that provides access to both get
and set
functionalities for it,
effectively creating a functional lens.
Type parameters
Name | Type |
---|---|
Path | extends string | number | symbol |
Value | extends any |
Parameters
Name | Type |
---|---|
path | Path |
value | Value |
Returns
Set
<Source
, Path
, Value
>