Package: effect
Module: TxHashSet
Extracts the value type from a TxHashSet type.
Example (Extracting a TxHashSet value type)
import type { TxHashSet } from "effect"
type FruitSet = TxHashSet.TxHashSet<"apple" | "banana" | "cherry">
// Extract the value type
type Fruit = TxHashSet.TxHashSet.Value<FruitSet> // "apple" | "banana" | "cherry"
const processFruit = (fruit: Fruit) => {
return `Processing ${fruit}`
}
console.log(processFruit("apple")) // Processing apple
Signature
type Value<T> = T extends TxHashSet<infer V> ? V : never
Since v4.0.0