/** * A basic comparator for incrementally watched queries. This performs a single comparison which * determines if the result set has changed. The {@link WatchedQuery} will only emit the new result * if a change has been detected. */ export interface WatchedQueryComparator { checkEquality: (current: Data, previous: Data) => boolean; } /** * Options for {@link ArrayComparator} */ export type ArrayComparatorOptions = { /** * Returns a string to uniquely identify an item in the array. */ compareBy: (item: ItemType) => string; }; /** * An efficient comparator for {@link WatchedQuery} created with {@link Query#watch}. This has the ability to determine if a query * result has changes without necessarily processing all items in the result. */ export declare class ArrayComparator implements WatchedQueryComparator { protected options: ArrayComparatorOptions; constructor(options: ArrayComparatorOptions); checkEquality(current: ItemType[], previous: ItemType[]): boolean; } /** * Watched query comparator that always reports changed result sets. */ export declare const FalsyComparator: WatchedQueryComparator;