Skip to main content
Module

x/rimbu/multimap/custom/index.ts>MultiMapContext

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class MultiMapContext
implements [MultiMapBase.Context]<UK, UV, Tp>
import { MultiMapContext } from "https://deno.land/x/rimbu@0.13.1/multimap/custom/index.ts";

Constructors

new
MultiMapContext(
typeTag: N,
keyMapContext: (Tp & KeyValue<UK, UV>)["keyMapContext"],
keyMapValuesContext: (Tp & KeyValue<UK, UV>)["keyMapValuesContext"],
)

Type Parameters

UK
UV
N extends string
optional
Tp extends ContextImplTypes = ContextImplTypes

Properties

readonly
_empty
readonly
builder: <K extends UK, V extends UV>() => WithKeyValue<Tp, K, V>["builder"]
readonly
empty: <K extends UK, V extends UV>() => WithKeyValue<Tp, K, V>["normal"]
readonly
from: any
readonly
of: <K extends UK, V extends UV>(...entries: ArrayNonEmpty<readonly [K, V]>) => [K, V] extends [UK, UV] ? WithKeyValue<Tp, K, V>["nonEmpty"] : never
readonly
reducer: <K extends UK, V extends UV>(source?: StreamSource<readonly [K, V]>) => Reducer<[K, V], WithKeyValue<Tp, K, V>["normal"]>

Methods

createBuilder<K, V>(source?: MultiMap.NonEmpty<K, V>): WithKeyValue<Tp, K, V>["builder"]
createNonEmpty<K extends UK, V extends UV>(keyMap: WithKeyValue<Tp, K, V>["keyMapNonEmpty"], size: number): WithKeyValue<Tp, K, V>["nonEmpty"]
isNonEmptyInstance<K, V>(source: any): source is WithKeyValue<Tp, K, V>["nonEmpty"]