function / @typed/fx

Versioned.replay

Replays the last bufferSize values of a Versioned stream.

Package version
2.0.0-beta.13
Category
Shared observation
Since
1.0.0
Member of
Versioned

Import

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

Access Versioned.replay through the imported Versioned 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 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