Skip to main content

interface NonLeaf<T,C>

undocumented

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

Type parameters

NameConstraintsDefaultDescription
Tundocumented
CBlock<any, C>anyundocumented

Properties

context

undocumented

Definition

readonly context: ListContext;

length

undocumented

Definition

readonly length: number;

level

undocumented

Definition

readonly level: number;

Methods

append

undocumented

Definition

append(child: C): NonLeaf<T, C>;

Parameters

NameTypeDescription
childC

concat

undocumented

Definition

concat<T2>(other: NonLeaf<T2, C>): NonLeaf<T | T2, C>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
otherNonLeaf<T2, C>

createNonLeafBuilder

undocumented

Definition

createNonLeafBuilder(): NonLeafBuilder<T, BlockBuilder<T>>;

dropFirst

undocumented

Definition

dropFirst(): [NonLeaf<T, C> | null, C];

dropInternal

undocumented

Definition

dropInternal(amount: number): [NonLeaf<T, C> | null, C, number];

Parameters

NameTypeDescription
amountnumber

dropLast

undocumented

Definition

dropLast(): [NonLeaf<T, C> | null, 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(index: number): T;

Parameters

NameTypeDescription
indexnumber

map

undocumented

Definition

map<T2>(mapFun: (value: T, index: number) => T2, options?: {
    reversed?: boolean;
    indexOffset?: number;
  }): NonLeaf<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;
  }): NonLeaf<T2>;

Type parameters

NameDescription
T2

Parameters

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

prepend

undocumented

Definition

prepend(child: C): NonLeaf<T, C>;

Parameters

NameTypeDescription
childC

reversed

undocumented

Definition

reversed(cacheMap?: CacheMap): NonLeaf<T, C>;

Parameters

NameTypeDescription
cacheMapCacheMap

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;

takeInternal

undocumented

Definition

takeInternal(amount: number): [NonLeaf<T, C> | null, C, number];

Parameters

NameTypeDescription
amountnumber

toArray

undocumented

Definition

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

Parameters

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

updateAt

undocumented

Definition

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

Parameters

NameTypeDescription
indexnumber
updateUpdate<T>