Hyperlinkv0.8.0-beta.28

TxHashSet

TxHashSet.isTxHashSetconsteffect/TxHashSet.ts:299
(u: unknown): u is TxHashSet<unknown>

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
})
guards
export const isTxHashSet = (u: unknown): u is TxHashSet<unknown> => hasProperty(u, TypeId)