Package: effect
Module: Optic
Iso that focuses on the whole value unchanged.
When to use
Use when you need to start an optic chain with a focus on the whole value.
Details
get(s) returns s.set(a) returns a.Example (Starting an optic chain)
import { Optic } from "effect"
type S = { readonly x: number }
const _x = Optic.id<S>().key("x")
console.log(_x.get({ x: 42 }))
// Output: 42
See
Iso — the type this function returnsSignature
declare const id: <S>() => Iso<S, S>
Since v4.0.0