Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/rimbu/list/custom/implementation/block.ts>Block

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
interface Block
import { type Block } from "https://deno.land/x/rimbu@1.2.1/list/custom/implementation/block.ts";

Type Parameters

T
optional
TS extends Block<T, TS, C> = any
optional
C = any

Properties

readonly
length: number
readonly
canAddChild: boolean
readonly
childrenInMin: boolean
children: readonly C[]

Methods

copy(children: C[], length: number): TS
concatChildren(other: TS): TS
prependInternal(child: C): TS
appendInternal(child: C): TS
get<O>(index: number, otherwise?: OptLazy<O>): T | O
updateAt(index: number, update: Update<T>): TS
stream(options?: { reversed?: boolean; }): Stream.NonEmpty<T>
streamRange(range: IndexRange, options?: { reversed?: boolean; }): Stream<T>
forEach(f: (
value: T,
index: number,
halt: () => void,
) => void
, options?: { reversed?: boolean; state?: TraverseState; }
): void
mapPure<T2>(mapFun: (value: T) => T2, options?: { reversed?: boolean; cacheMap?: CacheMap; }): Block<T2>
map<T2>(mapFun: (value: T, index: number) => T2, options?: { reversed?: boolean; indexOffset?: number; }): Block<T2>
reversed(cache: CacheMap): TS
toArray(options?: { range?: IndexRange | undefined; reversed?: boolean; }): T[] | any
structure(): string
_mutateSplitRight(index?: number): TS
createBlockBuilder(): BlockBuilder<T, any>