import { type TableBase } from "https://deno.land/x/rimbu@0.13.5/table/custom/index.ts";
const { Factory } = TableBase;
Methods
Returns the (singleton) empty instance of this type and context with given key and value types.
of<R extends UR, C extends UC, V>(...entries: ArrayNonEmpty<readonly [R, C, V]>): WithRow<Tp, R, C, V>["nonEmpty"]
Returns an immutable multimap of this collection type and context, containing the given entries
.
from<R extends UR, C extends UC, V>(...sources: ArrayNonEmpty<StreamSource.NonEmpty<readonly [R, C, V]>>): WithRow<Tp, R, C, V>["nonEmpty"]
Returns an immutable table of this type and context, containing the entries in the given sources
StreamSource
instances.
from<R extends UR, C extends UC, V>(...sources: ArrayNonEmpty<StreamSource<readonly [R, C, V]>>): WithRow<Tp, R, C, V>["normal"]
Returns an empty builder instance for this type of collection and context.
reducer<R extends UR, C extends UC, V>(source?: StreamSource<readonly [R, C, V]>): Reducer<[R, C, V], WithRow<Tp, R, C, V>["normal"]>
Returns a Reducer
that adds received tuples to a Table and returns the Table as a result. When a source
is given,
the reducer will first create a Table from the source, and then add tuples to it.