Interface DynIndexerAPI<K, T>

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(...);

T

interface DynIndexerAPI<K, T> {
    get active(): boolean;
    get hash(): number;
    get length(): number;
    [iterator](): IterableIterator<K, any, any>;
    update(force?: boolean): void;
}

Type Parameters

  • K
  • T

Accessors

  • 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.

Methods

  • Manually invoke an update of the index.

    Parameters

    • Optionalforce: boolean

      Force update to any subscribers.

    Returns void