Hyperlinkv0.8.0-beta.28

TxSubscriptionRef

TxSubscriptionRef.isTxSubscriptionRefconsteffect/TxSubscriptionRef.ts:518
(u: unknown): u is TxSubscriptionRef<unknown>

Checks whether the given value is a TxSubscriptionRef.

When to use

Use to narrow an unknown value before treating it as a TxSubscriptionRef.

Example (Checking transactional subscription references)

import { TxSubscriptionRef } from "effect"

declare const someValue: unknown

if (TxSubscriptionRef.isTxSubscriptionRef(someValue)) {
  console.log("This is a TxSubscriptionRef")
}
guardsmake
export const isTxSubscriptionRef = (u: unknown): u is TxSubscriptionRef<unknown> => hasProperty(u, TypeId)