Package: effect
Module: SubscriptionRef
A SubscriptionRef<A> is a Ref that can be subscribed to in order to
receive the current value as well as all changes to the value.
Signature
export interface SubscriptionRef<in out A>
extends SubscriptionRef.Variance<A>, Synchronized.SynchronizedRef<A>, Subscribable<A>
{
/** @internal */
readonly ref: Ref.Ref<A>
/** @internal */
readonly pubsub: PubSub.PubSub<A>
/** @internal */
readonly semaphore: Effect.Semaphore
/**
* A stream containing the current value of the `Ref` as well as all changes
* to that value.
*/
readonly changes: Stream.Stream<A>
readonly [Unify.typeSymbol]?: unknown
readonly [Unify.unifySymbol]?: SubscriptionRefUnify<this>
readonly [Unify.ignoreSymbol]?: SubscriptionRefUnifyIgnore
}
Since v2.0.0