function / @typed/fx/Versioned

multicast

Multicasts a Versioned stream.

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

Import

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

Signatures

export declare function multicast<R0, E0, A, E, R, B, E2, R2>(versioned: Versioned<R0, E0, A, E, R, B, E2, R2>): Versioned<R0, E0, A, E, R | Scope.Scope, B, E2, R2>;

Why

Shares one upstream push subscription among concurrent observers while retaining the original current-read and version effects. Unlike hold and replay, multicast retains zero values: a late observer receives only pushes that happen after it subscribes.

Ownership and lifetime

The returned Fx requires Scope; that Scope owns and finalizes the shared upstream subscription. There is no replay buffer or held latest value. Current reads bypass the multicast channel and retain the input’s errors and services.

Other public imports

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

Source