Skip to main content

interface BlockBuilder<T,C>

undocumented

Extends: BuilderBase<T,C>

Implemented by: NonLeafBlockBuilder<T,C>, LeafBlockBuilder<T>

Type parameters

NameDefaultDescription
Tundocumented
Cunknownundocumented

Properties

children

undocumented

Definition

children: C[];

length

undocumented

Definition

readonly length: number;

Overrides

BuilderBase.length

level

undocumented

Definition

level: number;

nrChildren

undocumented

Definition

nrChildren: number;

Methods

append

undocumented

Definition

append(value: C): void;

Parameters

NameTypeDescription
valueC

Overrides

BuilderBase.append

build

undocumented

Definition

build(): List<T> | NonLeaf<T>;

Overrides

BuilderBase.build

buildMap

undocumented

Definition

buildMap<T2>(f: (value: T) => T2): List<T2> | NonLeaf<T2>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
f(value: T) => T2

Overrides

BuilderBase.buildMap

concat

undocumented

Definition

concat(other: BlockBuilder<T, C>, prependOther?: boolean): void;

Parameters

NameTypeDescription
otherBlockBuilder<T, C>
prependOtherboolean

copy

undocumented

Definition

copy(children: C[], length: number): BlockBuilder<T, C>;

Parameters

NameTypeDescription
childrenC[]
lengthnumber

dropFirst

undocumented

Definition

dropFirst(): C;

dropLast

undocumented

Definition

dropLast(): C;

forEach

undocumented

Definition

forEach(f: (value: T, index: number, halt: () => void) => void, options?: {
    reversed?: boolean;
    state?: TraverseState;
  }): void;

Parameters

NameTypeDescription
f(value: T, index: number, halt: () => void) => void
options{
    reversed?: boolean;
    state?: TraverseState;
  }

get

undocumented

Definition

get<O>(index: number, otherwise?: OptLazy<O>): T | O;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
indexnumber
otherwiseOptLazy<O>

Overrides

BuilderBase.get

insert

undocumented

Definition

insert(index: number, value: T): void;

Parameters

NameTypeDescription
indexnumber
valueT

Overrides

BuilderBase.insert

prepend

undocumented

Definition

prepend(value: C): void;

Parameters

NameTypeDescription
valueC

Overrides

BuilderBase.prepend

remove

undocumented

Definition

remove(index: number): T;

Parameters

NameTypeDescription
indexnumber

Overrides

BuilderBase.remove

splitRight

undocumented

Definition

splitRight(index?: number): BlockBuilder<T, C>;

Parameters

NameTypeDescription
indexnumber

updateAt

undocumented

Definition

updateAt<O>(index: number, update: Update<T>, otherwise?: OptLazy<O>): T | O;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
indexnumber
updateUpdate<T>
otherwiseOptLazy<O>