variable / @typed/fx/RefResult

getFailure

Get the failure value from the Result as a Filtered (fails if Success).

Package version
2.0.0-beta.7
Category
Optional queries
Since
1.18.0

Import

import { getFailure } from "@typed/fx/RefResult";

Signatures

export declare const getFailure: <A, ResultE, Err, R>(ref: RefResult<A, ResultE, Err, R>) => RefSubject.Filtered<ResultE, Err, R>;

Why

Models the possibly absent result of get failure as Filtered state, so absence stays explicit while later source versions can make a value available.

Ownership and lifetime

The get failure view retains no independent value. Its Effect read fails with NoSuchElement while absent; the observing Scope owns and finalizes its Fx subscription.

Other public imports

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

Source