effect-io-ai

Package: effect
Module: TxHashSet

TxHashSet.isEmpty

Checks whether the TxHashSet is empty.

Example (Checking whether a set is empty)

import { Effect, TxHashSet } from "effect"

const program = Effect.gen(function*() {
  const empty = yield* TxHashSet.empty<string>()
  console.log(yield* TxHashSet.isEmpty(empty)) // true

  const nonEmpty = yield* TxHashSet.make("a")
  console.log(yield* TxHashSet.isEmpty(nonEmpty)) // false
})

Signature

declare const isEmpty: <V>(self: TxHashSet<V>) => Effect.Effect<boolean>

Source

Since v2.0.0