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

x/rimbu/collection-types/map-custom/index.ts>RMapBase.NonEmpty

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
interface RMapBase.NonEmpty
implements [VariantMapBase.NonEmpty]<K, V, Tp>, Omit<RMapBase<K, V, Tp>, keyof VariantMapBase.NonEmpty<any, any, any>>, [Streamable.NonEmpty]<readonly [K, V]>
import { type RMapBase } from "https://deno.land/x/rimbu@0.13.0/collection-types/map-custom/index.ts";
const { NonEmpty } = RMapBase;

Methods

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

Returns a non-empty Stream containing all entries of this collection as tuples of key and value.

addEntries(entries: StreamSource<readonly [K, V]>): WithKeyValue<Tp, K, V>["nonEmpty"]

Returns the collection with the entries from the given StreamSource entries added.

updateAt<UK = K>(key: RelatedTo<K, UK>, update: RMapBase.Update<V>): WithKeyValue<Tp, K, V>["nonEmpty"]

Returns the collection where the value associated with given key is updated with the given update value or update function.