Package: effect
Module: TxSubscriptionRef
Reads the current value of the TxSubscriptionRef.
When to use
Use to read the current TxSubscriptionRef value without subscribing to
future changes.
Example (Reading the current value)
import { Effect, TxSubscriptionRef } from "effect"
const program = Effect.gen(function*() {
const ref = yield* TxSubscriptionRef.make("hello")
const value = yield* TxSubscriptionRef.get(ref)
console.log(value) // "hello"
})
See
changes for reading the current value and subsequent updatesSignature
declare const get: <A>(self: TxSubscriptionRef<A>) => Effect.Effect<A>
Since v3.10.0