Skip to content

prop

prop<S>(): <K>(key) => Lens<S, S[K]>

Defined in: Core/Lens.ts:49

Creates a Lens that focuses on a property of an object. Call with the structure type first, then the key.

S

<K>(key) => Lens<S, S[K]>

const nameLens = Lens.prop<User>()("name");