Skip to main content

Interface: Lens<Source>

Lens.Lens

Type parameters

NameType
Sourceextends 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

NameType
Pathextends string | number | symbol

Parameters

NameType
pathPath

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

NameType
Pathextends string | number | symbol
Valueextends any

Parameters

NameType
pathPath
valueValue

Returns

Set<Source, Path, Value>