type-alias / @typed/fx

Fx.Fx.Success

Extracts the emitted value type from an Fx.

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

Import

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

Access Fx.Fx.Success 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 Success<T> = [
    T
] extends [
    never
] ? never : T extends Fx<infer _A, infer _E, infer _R> ? _A : never;

Why

Higher-order APIs can preserve a producer’s value channel without restating all three Fx type parameters. 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