Skip to main content

class LeafBlock<T>

undocumented

Implements: Block<T,TS,C>

Extended by: ReversedLeafBlock<T>

Type parameters

NameDescription
Tundocumented

Properties

canAddChild

undocumented

Definition

get canAddChild(): boolean;

Overrides

Block.canAddChild

children

undocumented

Definition

readonly children: readonly T[];

Overrides

Block.children

childrenInMax

undocumented

Definition

get childrenInMax(): boolean;

childrenInMin

undocumented

Definition

get childrenInMin(): boolean;

Overrides

Block.childrenInMin

context

undocumented

Definition

readonly context: ListContext;

length

undocumented

Definition

get length(): number;

Overrides

Block.length

level

undocumented

Definition

get level(): 0;

mutateChildren

undocumented

Definition

get mutateChildren(): T[];

Methods

_mutateNormalize

undocumented

Definition

_mutateNormalize(): List.NonEmpty<T>;

_mutateSplitRight

undocumented

Definition

_mutateSplitRight(childIndex?: number): LeafBlock<T>;

Parameters

NameTypeDescription
childIndexnumber

Overrides

Block._mutateSplitRight

append

undocumented

Definition

append(value: T): List.NonEmpty<T>;

Parameters

NameTypeDescription
valueT

appendInternal

undocumented

Definition

appendInternal(value: T): LeafBlock<T>;

Parameters

NameTypeDescription
valueT

Overrides

Block.appendInternal

concat

undocumented

Definition

concat<T2>(...sources: ArrayNonEmpty<StreamSource<T2>>): List.NonEmpty<T | T2>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
sourcesArrayNonEmpty<StreamSource<T2>>

concatBlock

undocumented

Definition

concatBlock(other: LeafBlock<T>): List.NonEmpty<T>;

Parameters

NameTypeDescription
otherLeafBlock<T>

concatChildren

undocumented

Definition

concatChildren(other: LeafBlock<T>): LeafBlock<T>;

Parameters

NameTypeDescription
otherLeafBlock<T>

Overrides

Block.concatChildren

concatTree

undocumented

Definition

concatTree(other: LeafTree<T>): LeafTree<T>;

Parameters

NameTypeDescription
otherLeafTree<T>

copy

undocumented

Definition

copy(children: readonly T[]): LeafBlock<T>;

Parameters

NameTypeDescription
childrenreadonly T[]

Overrides

Block.copy

copy2

undocumented

Definition

copy2<T2>(children: readonly T2[]): LeafBlock<T2>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
childrenreadonly T2[]

createBlockBuilder

undocumented

Definition

createBlockBuilder(): BlockBuilder<T, any>;

Overrides

Block.createBlockBuilder

drop

undocumented

Definition

drop(amount: number): List<T>;

Parameters

NameTypeDescription
amountnumber

dropChildren

undocumented

Definition

dropChildren(childAmount: number): LeafBlock<T>;

Parameters

NameTypeDescription
childAmountnumber

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

Block.forEach

get

undocumented

Definition

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

Type parameters

NameDescription
O

Parameters

NameTypeDescription
indexnumber
otherwiseOptLazy<O>

Overrides

Block.get

map

undocumented

Definition

map<T2>(mapFun: (value: T, index: number) => T2, options?: {
    reversed?: boolean;
    indexOffset?: number;
  }): LeafBlock<T2>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
mapFun(value: T, index: number) => T2
options{
    reversed?: boolean;
    indexOffset?: number;
  }

Overrides

Block.map

mapPure

undocumented

Definition

mapPure<T2>(mapFun: (value: T) => T2, options?: {
    reversed?: boolean;
    cacheMap?: CacheMap;
  }): LeafBlock<T2>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
mapFun(value: T) => T2
options{
    reversed?: boolean;
    cacheMap?: CacheMap;
  }

Overrides

Block.mapPure

prepend

undocumented

Definition

prepend(value: T): List.NonEmpty<T>;

Parameters

NameTypeDescription
valueT

prependInternal

undocumented

Definition

prependInternal(value: T): LeafBlock<T>;

Parameters

NameTypeDescription
valueT

Overrides

Block.prependInternal

reversed

undocumented

Definition

reversed(cacheMap?: CacheMap): LeafBlock<T>;

Parameters

NameTypeDescription
cacheMapCacheMap

Overrides

Block.reversed

stream

undocumented

Definition

stream(options?: {
    reversed?: boolean;
  }): Stream.NonEmpty<T>;

Parameters

NameTypeDescription
options{
    reversed?: boolean;
  }

Overrides

Block.stream

streamRange

undocumented

Definition

streamRange(range: IndexRange, options?: {
    reversed?: boolean;
  }): Stream<T>;

Parameters

NameTypeDescription
rangeIndexRange
options{
    reversed?: boolean;
  }

Overrides

Block.streamRange

structure

undocumented

Definition

structure(): string;

Overrides

Block.structure

take

undocumented

Definition

take(amount: number): List<T> | any;

Parameters

NameTypeDescription
amountnumber

takeChildren

undocumented

Definition

takeChildren(childAmount: number): LeafBlock<T>;

Parameters

NameTypeDescription
childAmountnumber

toArray

undocumented

Definition

toArray(options?: {
    range?: IndexRange | undefined;
    reversed?: boolean;
  }): T[] | any;

Parameters

NameTypeDescription
options{
    range?: IndexRange | undefined;
    reversed?: boolean;
  }

Overrides

Block.toArray

updateAt

undocumented

Definition

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

Parameters

NameTypeDescription
indexnumber
updateUpdate<T>

Overrides

Block.updateAt