Skip to main content
Module

x/rimbu/mod.ts>HashMultiMapHashValue.NonEmpty

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
interface HashMultiMapHashValue.NonEmpty
implements [MultiMapBase.NonEmpty]<K, V, HashMultiMapHashValue.Types>, Omit<HashMultiMapHashValue<K, V>, keyof MultiMapBase.NonEmpty<any, any, any>>, [Streamable.NonEmpty]<[K, V]>
import { type HashMultiMapHashValue } from "https://deno.land/x/rimbu@0.13.1/mod.ts";
const { NonEmpty } = HashMultiMapHashValue;

A non-empty type-invariant immutable MultiMap of key type K, and value type V. In the MultiMap, each key has at least one value. See the MultiMap documentation and the HashMultiMapHashValue API documentation

Examples

Example 1

const m1 = HashMultiMapHashValue.empty<number, string>()
const m2 = HashMultiMapHashValue.of([1, 'a'], [1, 'b'], [2, 'a'])

Methods

stream(): Stream.NonEmpty<[K, V]>