Interface Optic<S, V, C>

    A lens as a first-class value, unbound from any source. get projects the source(s) S to a view V; put writes the view back as per-source Updates<S>. A 1-arg put is an iso and ignores the source. complement present ⇒ stateful (see the stateful-optic header). Apply with cell.lens / lens; build with optic / iso / atKey.

    interface Optic<S, V, C extends object = never> {
        complement?: (s: S) => C;
        get(s: S, c: C): V;
        put(target: V, s: S, c: C): Updates<S>;
    }

    Type Parameters

    • S
    • V
    • C extends object = never
    Index

    Methods

    Properties

    Methods

    Properties

    complement?: (s: S) => C

    Present ⇒ stateful; seeds the per-bind complement.