Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.
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@1.2.1/collection-types/map-custom/index.ts";
const { NonEmpty } = RMapBase;

Type Parameters

K
V
optional
Tp extends RMapBase.Types = RMapBase.Types

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.