Skip to main content

interface Block<T,TS,C>

undocumented

Implemented by: NonLeafBlock<T,C>, LeafBlock<T>

Type parameters

NameConstraintsDefaultDescription
Tundocumented
TSBlock<T, TS, C>anyundocumented
Canyundocumented

Properties

canAddChild

undocumented

Definition

readonly canAddChild: boolean;

children

undocumented

Definition

children: readonly C[];

childrenInMin

undocumented

Definition

readonly childrenInMin: boolean;

length

undocumented

Definition

readonly length: number;

Methods

_mutateSplitRight

undocumented

Definition

_mutateSplitRight(index?: number): TS;

Parameters

NameTypeDescription
indexnumber

appendInternal

undocumented

Definition

appendInternal(child: C): TS;

Parameters

NameTypeDescription
childC

concatChildren

undocumented

Definition

concatChildren(other: TS): TS;

Parameters

NameTypeDescription
otherTS

copy

undocumented

Definition

copy(children: C[], length: number): TS;

Parameters

NameTypeDescription
childrenC[]
lengthnumber

createBlockBuilder

undocumented

Definition

createBlockBuilder(): BlockBuilder<T, any>;

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>

map

undocumented

Definition

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

Type parameters

NameDescription
T2

Parameters

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

mapPure

undocumented

Definition

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

Type parameters

NameDescription
T2

Parameters

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

prependInternal

undocumented

Definition

prependInternal(child: C): TS;

Parameters

NameTypeDescription
childC

reversed

undocumented

Definition

reversed(cache: CacheMap): TS;

Parameters

NameTypeDescription
cacheCacheMap

stream

undocumented

Definition

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

Parameters

NameTypeDescription
options{
    reversed?: boolean;
  }

streamRange

undocumented

Definition

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

Parameters

NameTypeDescription
rangeIndexRange
options{
    reversed?: boolean;
  }

structure

undocumented

Definition

structure(): string;

toArray

undocumented

Definition

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

Parameters

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

updateAt

undocumented

Definition

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

Parameters

NameTypeDescription
indexnumber
updateUpdate<T>