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

x/rimbu/list/custom/builder/leaf/block-builder.ts>LeafBlockBuilder

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

Constructors

new
LeafBlockBuilder(
context: ListContext,
source?: LeafBlock<T>,
_children?: T[],
)

Properties

children: T[]
readonly
length: number
readonly
level: number
readonly
nrChildren: number

Methods

append(value: T): void
buildMap<T2>(f: (value: T) => T2): LeafBlock<T2>
concat(other: LeafBlockBuilder<T>, prependOther?): void
copy(children: T[]): LeafBlockBuilder<T>
forEach(f: (
value: T,
index: number,
halt: () => void,
) => void
, state?: TraverseState
): void
get<O>(index: number, otherwise?: OptLazy<O>): T | O
insert(index: number, value: T): void
normalized(): LeafBuilder<T> | undefined
prepend(value: T): void
remove(index: number): T
updateAt(index: number, update: Update<T>): T