function / @typed/fx/RefSubject

makeFiltered

Builds a Filtered view from the three channels of a Versioned source.

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

Import

import { makeFiltered } from "@typed/fx/RefSubject";

Signatures

export declare function makeFiltered<R0, E0, A, E, R, E2, R2, C, E3, R3>(input: Versioned.Versioned<R0, E0, A, E, R, A, E2, R2>, f: (a: A) => Effect.Effect<Option.Option<C>, E3, R3>): Filtered<C, E0 | E | E2 | E3, R0 | Exclude<R, Scope.Scope> | R2 | R3>;

Why

Applies f to current reads and later pushes while preserving absence as Filtered semantics: Effect reads fail with NoSuchElementError, whereas the Fx channel simply omits absent values.

Ownership and lifetime

Sampled results and pushed sessions are isolated by Effect Context identity. Within one Context, current reads cache by source version and observers share the active held projection. Its Effect read fails with NoSuchElement while absent; the observing Scope owns its subscription.

Other public imports

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

Source