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

x/rimbu/multiset/custom/implementation/base.ts>MultiSetContext

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class MultiSetContext
implements [MultiSetBase.Context]<UT, Tp>
import { MultiSetContext } from "https://deno.land/x/rimbu@0.14.0/multiset/custom/implementation/base.ts";

Constructors

new
MultiSetContext(typeTag: N, countMapContext: (Tp & Elem<UT>)["countMapContext"])

Type Parameters

UT
N extends string
optional
Tp extends ContextImplTypes = ContextImplTypes

Properties

readonly
_empty: WithElem<Tp, UT>["normal"]
readonly
_types: Tp
readonly
builder: <T extends UT>() => WithElem<Tp, T>["builder"]
readonly
empty: <T extends UT>() => WithElem<Tp, T>["normal"]
readonly
from: any
readonly
of: <T>(...values: ArrayNonEmpty<T>) => T extends UT ? WithElem<Tp, T>["nonEmpty"] : never
readonly
reducer: <T extends UT>(source?: StreamSource<T>) => Reducer<T, WithElem<Tp, T>["normal"]>

Methods

createBuilder<T extends UT>(source?: WithElem<Tp, T>["nonEmpty"]): WithElem<Tp, T>["builder"]
createNonEmpty<T extends UT>(countMap: WithElem<Tp, T>["countMapNonEmpty"], size: number): WithElem<Tp, T>["nonEmpty"]
isNonEmptyInstance<T>(source: any): source is WithElem<Tp, T>["nonEmpty"]
isValidElem(elem: any): elem is UT