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

x/rimbu/list/custom/index.ts>NonLeafBlockBuilder

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class NonLeafBlockBuilder
implements BlockBuilder<T, C>
Re-export
import { NonLeafBlockBuilder } from "https://deno.land/x/rimbu@0.13.1/list/custom/index.ts";

Constructors

new
NonLeafBlockBuilder(
context: ListContext,
level: number,
source?: NonLeafBlock<T, any>,
_children?: C[],
length?: number,
)

Properties

children: C[]
readonly
nrChildren: number

Methods

append(child: C): void
buildMap<T2>(f: (value: T) => T2): NonLeafBlock<T2, any>
concat(other: NonLeafBlockBuilder<T, C>, prependOther?): void
copy(children: C[], length: number): NonLeafBlockBuilder<T, C>
first(): C
forEach(f: (
value: T,
index: number,
halt: () => void,
) => void
, state?: TraverseState
): void
get(index: number): T
getCoordinates(index: number): [number, number]
insert(index: number, value: T): void
last(): C
modifyFirstChild(f: (child: C) => number | undefined): number | undefined
modifyLastChild(f: (child: C) => number | undefined): number | undefined
normalized(): NonLeafBuilder<T, C> | undefined
prepend(child: C): void
remove(index: number): T
updateAt<O>(
index: number,
update: Update<T>,
otherwise?: OptLazy<O>,
): T | O