effect-io-ai

Package: effect
Module: SubscriptionRef

SubscriptionRef.make

Constructs a new SubscriptionRef from an initial value.

When to use

Use to create a SubscriptionRef when consumers need to read the latest value and subscribe to every update.

Details

The initial value is published during construction, so changes starts new subscribers with that value before future updates.

See

Signature

declare const make: <A>(value: A) => Effect.Effect<SubscriptionRef<A>>

Source

Since v2.0.0