Skip to main content

class LeafBlockBuilder<T>

undocumented

Implements: BlockBuilder<T,C>, LeafBuilder<T>

Type parameters

NameDescription
Tundocumented

Properties

_children

undocumented

Definition

_children?: T[] | undefined;

children

undocumented

Definition

get children(): T[];

set children(value: T[]);

Overrides

BlockBuilder.children

context

undocumented

Definition

readonly context: ListContext;

length

undocumented

Definition

get length(): number;

Overrides

BuilderBase.length

level

undocumented

Definition

get level(): number;

Overrides

BlockBuilder.level

nrChildren

undocumented

Definition

get nrChildren(): number;

Overrides

BlockBuilder.nrChildren

source

undocumented

Definition

source?: LeafBlock<T> | undefined;

Methods

append

undocumented

Definition

append(value: T): void;

Parameters

NameTypeDescription
valueT

Overrides

BuilderBase.append

build

undocumented

Definition

build(): LeafBlock<T>;

Overrides

BuilderBase.build, LeafBuilder.build

buildMap

undocumented

Definition

buildMap<T2>(f: (value: T) => T2): LeafBlock<T2>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
f(value: T) => T2

Overrides

BuilderBase.buildMap, LeafBuilder.buildMap

concat

undocumented

Definition

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

Parameters

NameTypeDescription
otherLeafBlockBuilder<T>
prependOtherboolean

Overrides

BlockBuilder.concat

copy

undocumented

Definition

copy(children: T[]): LeafBlockBuilder<T>;

Parameters

NameTypeDescription
childrenT[]

Overrides

BlockBuilder.copy

dropFirst

undocumented

Definition

dropFirst(): T;

Overrides

BlockBuilder.dropFirst

dropLast

undocumented

Definition

dropLast(): T;

Overrides

BlockBuilder.dropLast

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;
  }

Overrides

BlockBuilder.forEach, LeafBuilder.forEach

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

normalized

undocumented

Definition

normalized(): LeafBuilder<T> | undefined;

Overrides

LeafBuilder.normalized

prepend

undocumented

Definition

prepend(value: T): void;

Parameters

NameTypeDescription
valueT

Overrides

BuilderBase.prepend

remove

undocumented

Definition

remove(index: number): T;

Parameters

NameTypeDescription
indexnumber

Overrides

BlockBuilder.remove, BuilderBase.remove

splitRight

undocumented

Definition

splitRight(index?: number): LeafBlockBuilder<T>;

Parameters

NameTypeDescription
indexnumber

Overrides

BlockBuilder.splitRight

updateAt

undocumented

Definition

updateAt(index: number, update: Update<T>): T;

Parameters

NameTypeDescription
indexnumber
updateUpdate<T>

Overrides

BlockBuilder.updateAt, LeafBuilder.updateAt