Provides the public API for accessing the index API.

This class forms the public API which is accessible from the .index getter in the main reducer implementation.

const dynArray = new DynArrayReducer([...]);
dynArray.index.active;
dynArray.index.hash;
dynArray.index.length;
dynArray.index.update(...);
interface Index<K> {
    update: IndexUpdateFn;
    get active(): boolean;
    get hash(): number;
    get length(): number;
    "[iterator]"(): IterableIterator<K>;
}

Type Parameters

  • K

    any - Key type.

Index
  • get active(): boolean

    Returns boolean

    Returns whether the index is active.

  • get hash(): number

    Returns number

    Current hash value of the index.

  • get length(): number

    Returns number

    Returns length of reduced index.

Manually updates associated dynamic reducer indexer.

Optional settings or any arbitrary value.

Force an update the index regardless of hash calculations.

Potentially change reversed state.