effect-io-ai

Package: effect
Module: Schema

Schema.Record.Iso

Computes the iso object type for a record schema from the key schema’s Iso keys and the value schema’s Iso values.

Signature

type Iso<Key, Value> = Value extends
    { readonly "~type.optionality": "optional" } ?
    Value extends { readonly "~type.mutability": "mutable" } ? { [P in Key["Iso"]]?: Value["Iso"] }
    : { readonly [P in Key["Iso"]]?: Value["Iso"] }
    : Value extends { readonly "~type.mutability": "mutable" } ? { [P in Key["Iso"]]: Value["Iso"] }
    : { readonly [P in Key["Iso"]]: Value["Iso"] }

Source

Since v4.0.0