effect-io-ai

Package: effect
Module: TxHashSet

TxHashSet.isTxHashSet

Checks whether a value is a TxHashSet.

Example (Checking for a TxHashSet)

import { Effect, HashSet, TxHashSet } from "effect"

const program = Effect.gen(function*() {
  const txSet = yield* TxHashSet.make(1, 2, 3)
  const hashSet = HashSet.make(1, 2, 3)
  const array = [1, 2, 3]

  console.log(TxHashSet.isTxHashSet(txSet)) // true
  console.log(TxHashSet.isTxHashSet(hashSet)) // false
  console.log(TxHashSet.isTxHashSet(array)) // false
  console.log(TxHashSet.isTxHashSet(null)) // false
})

Signature

declare const isTxHashSet: (u: unknown) => u is TxHashSet<unknown>

Source

Since v4.0.0