variable / @typed/fx

RefOption.getValue

Get the value from the Option as a Filtered (fails if None).

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

Import

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

Access RefOption.getValue through the imported RefOption 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

export declare const getValue: <A, E, R>(ref: RefOption<A, E, R>) => RefSubject.Filtered<A, E, R>;

Why

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

Ownership and lifetime

The get value 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