Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/multimap/main/index.ts>HashMultiMapSortedValue.NonEmpty

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

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 HashMultiMapSortedValue API documentation

Examples

Example 1

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

Methods

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