effect-io-ai

Package: effect
Module: Types

Types.Invariant.Type

Extracts the type parameter A from an Invariant<A>.

When to use

Use to recover the carried type from an invariant phantom marker.

Example (Extracting the inner type)

import type { Types } from "effect"

type Inner = Types.Invariant.Type<Types.Invariant<number>>
// number

See

Signature

type Type<A> = A extends Invariant<infer U> ? U : never

Source

Since v3.9.0