Package: effect
Module: Schema
A schema that additionally supports optic (lens/prism) operations.
Details
Optic<T, Iso> extends Schema<T> with an Iso type that
describes the isomorphic counterpart used by the optic layer. Crucially,
decoding and encoding require no Effect services (DecodingServices and
EncodingServices are both never), which means the optic can operate
purely without an Effect runtime.
Most primitive schemas (e.g. Schema.String, Schema.Number) implement
Optic automatically. You normally interact with this interface through
Optic_ utilities rather than constructing it directly.
Signature
export interface Optic<out T, out Iso> extends Schema<T> {
readonly "Iso": Iso
readonly "DecodingServices": never
readonly "EncodingServices": never
readonly "Rebuild": Optic<T, Iso>
}
Since v4.0.0