Interface TrieSearchReducer<T>
interface TrieSearchReducer<T> {
get keyFields(): Key | KeyFields;
get matches(): T[];
reduce(data: TrieSearchReducerData<T>): void;
reset(data: TrieSearchReducerResetData<T>): void;
}
get keyFields(): Key | KeyFields;
get matches(): T[];
reduce(data: TrieSearchReducerData<T>): void;
reset(data: TrieSearchReducerResetData<T>): void;
}
Type Parameters
Implemented by
Methods
reduce
- reduce(data): void
Defines a reducer function used to accumulate and reduce data found in searching.
Parameters
- data: TrieSearchReducerData<T>
The data to be reduced.
Returns void
- data: TrieSearchReducerData<T>
reset
- reset(data): void
Resets any state of the reducer. This is invoked at the beginning of TrieSearch.search.
Parameters
- data: TrieSearchReducerResetData<T>
The reset data.
Returns void
- data: TrieSearchReducerResetData<T>
Provides an interface for all reducers.