effect-io-ai

Package: effect
Module: Schema

Schema.ConstraintCodec

Lightweight structural constraint for APIs that need codec type views but do not need the full schema protocol.

When to use

Use when you need to preserve decoded type, encoded type, and service requirements for a schema value, but the API does not call schema methods such as annotate, check, rebuild, make, or makeEffect.

See

Signature

export interface ConstraintCodec<out T, out E = T, out RD = never, out RE = never> extends Constraint {
  readonly "Type": T
  readonly "Encoded": E
  readonly "DecodingServices": RD
  readonly "EncodingServices": RE
}

Source

Since v4.0.0