Skip to main content
Module

x/rimbu/table/custom/index.ts>TableBase

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
namespace TableBase
Re-export
import { TableBase } from "https://deno.land/x/rimbu@0.13.1/table/custom/index.ts";

Interfaces

Utility interface that provides higher-kinded types for this collection.

interface TableBase
implements VariantTableBase<R, C, V, Tp>
Re-export
import { type TableBase } from "https://deno.land/x/rimbu@0.13.1/table/custom/index.ts";

Properties

readonly
context: WithRow<Tp, R, C, V>["context"]

Returns the context associated to this collection instance.

Methods

set(
row: R,
column: C,
value: V,
): WithRow<Tp, R, C, V>["nonEmpty"]

Returns the collection where the given value is associated with the given row and column keys.

addEntry(entry: readonly [R, C, V]): WithRow<Tp, R, C, V>["nonEmpty"]

Returns the collection with the given entry added.

addEntries(entries: StreamSource.NonEmpty<readonly [R, C, V]>): WithRow<Tp, R, C, V>["nonEmpty"]

Returns the collection with the given entries added.

addEntries(entries: StreamSource<readonly [R, C, V]>): WithRow<Tp, R, C, V>["normal"]
modifyAt(
row: R,
column: C,
options: { ifNew?: OptLazyOr<V, Token>; ifExists?: (value: V, remove: Token) => V | Token; },
): WithRow<Tp, R, C, V>["normal"]

Returns the collection with the value at given row and column keys modified according to given options.

updateAt<UR = R, UC = C>(
row: RelatedTo<R, UR>,
column: RelatedTo<C, UC>,
update: Update<V>,
): WithRow<Tp, R, C, V>["normal"]

Returns the collection with the value at given row and column keys updated according to the given update function.

toBuilder(): WithRow<Tp, R, C, V>["builder"]

Returns a builder object containing the entries of this collection.