@reactivex/ix-es5-esm
Version:
The Interactive Extensions for JavaScript
22 lines (21 loc) • 686 B
TypeScript
/**
* This class holds the options for the distinct operator including a key selector and comparer.
*
* @interface DistinctOptions
* @template TSource The type of the elements in the source sequence.
* @template TKey The type of the discriminator key computed for each element in the source sequence.
*/
export interface DistinctOptions<TSource, TKey = TSource> {
/**
* A function to compute the comparison key for each element.
*
* @memberof DistinctOptions
*/
keySelector?: (value: TSource) => TKey;
/**
* Equality comparer for source elements.
*
* @memberof DistinctOptions
*/
comparer?: (x: TKey, y: TKey) => boolean;
}