effect-io-ai

Package: effect
Module: Schema

Schema.TupleWithRest.Iso

Computes the iso tuple type for a TupleWithRest.

Details

The output starts with the fixed tuple’s Iso elements, continues with zero or more values using the first rest schema’s Iso, and includes any trailing rest schemas as fixed tuple positions.

Signature

type Iso<T, Rest> = Rest extends
    readonly [infer Head extends Constraint, ...infer Tail extends ReadonlyArray<Constraint>] ? Readonly<[
      ...T,
      ...Array<Head["Iso"]>,
      ...{ readonly [K in keyof Tail]: Tail[K]["Iso"] }
    ]> :
    T

Source

Since v4.0.0