variable / @typed/fx/RefRecord

get

Get the value at a key as a Filtered.

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

Import

import { get } from "@typed/fx/RefRecord";

Signatures

export declare const get: {
    <K extends string>(key: K): <V, E, R>(ref: RefRecord<K, V, E, R>) => RefSubject.Filtered<V, E, R>;
    <K extends string, V, E, R>(ref: RefRecord<K, V, E, R>, key: K): RefSubject.Filtered<V, E, R>;
};

Why

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

Ownership and lifetime

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