Skip to main content
Module

x/rimbu/multiset/custom/index.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/index.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