Skip to main content
Module

x/rimbu/mod.ts>OrderedMap.NonEmpty

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

A non-empty type-invariant immutable Ordered Map of key type K, and value type V. In the Map, each key has exactly one value, and the Map cannot contain duplicate keys. See the Map documentation and the OrderedMap API documentation

Examples

Example 1

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

Methods

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