Package: effect
Module: TxPubSub
Checks whether the TxPubSub has been shut down.
Example (Checking whether a pub/sub is shut down)
import { Effect, TxPubSub } from "effect"
const program = Effect.gen(function*() {
const hub = yield* TxPubSub.unbounded<number>()
console.log(yield* TxPubSub.isShutdown(hub)) // false
yield* TxPubSub.shutdown(hub)
console.log(yield* TxPubSub.isShutdown(hub)) // true
})
Signature
declare const isShutdown: <A>(self: TxPubSub<A>) => Effect.Effect<boolean>
Since v2.0.0