Provides an interface for all reducers.

interface TrieSearchReducer<T> {
    get keyFields(): Key | KeyFields;
    get matches(): T[];
    reduce(data: TrieSearchReducerData<T>): void;
    reset(data: TrieSearchReducerResetData<T>): void;
}

Type Parameters

  • T extends object
Implemented by

Accessors

Methods

Accessors

  • get keyFields(): Key | KeyFields
  • Returns Key | KeyFields

    Any associated key fields to limit match intersection / HashArray in TrieSearch.#getImpl.

  • get matches(): T[]
  • Returns T[]

    The matches after reducing.

Methods

  • Defines a reducer function used to accumulate and reduce data found in searching.

    Parameters

    Returns void