type-alias / @typed/fx

Fx.Fx.Error

Extracts the typed error from an Fx.

Package version
2.0.0-beta.7
Category
Type contracts
Since
1.0.0
Member of
Fx.Fx

Import

import { Fx } from "@typed/fx";

Access Fx.Fx.Error through the imported Fx export. Its declaration below describes the member.

This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.

Signatures

type Error<T> = [
    T
] extends [
    never
] ? never : T extends Fx<infer _A, infer _E, infer _R> ? _E : never;

Why

Higher-order APIs can combine an unknown producer’s failure channel precisely. never remains never rather than distributing.

Ownership and lifetime

This conditional type performs no runtime work.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source