effect-io-ai

Package: effect
Module: Cause

Cause.Reason.Error

Extracts the error type E from a Reason<E>.

Example (Extracting the error type)

import type { Cause } from "effect"

// string
type E = Cause.Reason.Error<Cause.Reason<string>>

Signature

type Error<T> = T extends Reason<infer E> ? E : never

Source

Since v4.0.0