Module / v2.0.0-beta.7

@typed/fx/Subject

11 unique exports available through this public import path, including their members and aliases.

import * as Subject from "@typed/fx/Subject";

Publication contracts

  • Subject

    interface

    A multicast boundary that is both an Fx of its publications and a Sink that accepts them. Successes and failures are pushed to every subscriber present when that publication begins.

Sharing sources

  • Share

    class

    The concrete lazy Fx returned by share.

  • hold

    function

    Shares an Fx and immediately replays its latest success or failure to each new subscriber.

  • multicast

    function

    Multicasts an Fx without replaying values that arrived before a subscriber joined.

  • replay

    variable

    Shares an Fx and replays up to the last capacity successes or failures to new subscribers.

  • share

    function

    Shares one active execution of an Fx among subscribers through the supplied Subject.

Subject construction

  • make

    function

    Acquires a Subject whose subscribers and replay state are released with the current Scope.

  • unsafeMake

    function

    Immediately allocates a Subject with the requested replay capacity and manual ownership.

Subject services

  • Service

    function

    Defines an Effect context service that is simultaneously a Subject, Fx, and Sink facade.

  • Subject.Class

    interface

    A constructible service facade whose static side is also the contextual Subject.

  • Subject.Service

    interface

    The service-shaped form of a Subject created by Subject.Service.