effect-io-ai

Package: effect
Module: Cause

Cause.Cause.Error

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

Example (Extracting the error type)

import type { Cause } from "effect"

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

Signature

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

Source

Since v4.0.0