function / @typed/fx/Versioned

replay

Replays the last bufferSize values of a Versioned stream.

Package version
2.0.0-beta.7
Category
Shared observation
Since
1.0.0

Import

import { replay } from "@typed/fx/Versioned";

Signatures

export declare function replay<R0, E0, A, E, R, B, E2, R2>(versioned: Versioned<R0, E0, A, E, R, B, E2, R2>, bufferSize: number): Versioned<R0, E0, A, E | Cause.IllegalArgumentError, R | Scope.Scope, B, E2, R2>;

Why

Shares an upstream push subscription and replays a bounded number of updates to late observers without changing current-value reads.

Ownership and lifetime

The returned Fx requires Scope; its shared upstream subscription and retained buffer are finalized when that Scope closes. Current reads retain input errors and services.

Other public imports

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

Source