diff --git a/compat/operator/distinctUntilKeyChanged.ts b/compat/operator/distinctUntilKeyChanged.ts index e29a3740847..59f0787cc89 100644 --- a/compat/operator/distinctUntilKeyChanged.ts +++ b/compat/operator/distinctUntilKeyChanged.ts @@ -4,7 +4,7 @@ import { distinctUntilKeyChanged as higherOrder } from 'rxjs/operators'; /* tslint:disable:max-line-length */ export function distinctUntilKeyChanged(this: Observable, key: string): Observable; -export function distinctUntilKeyChanged(this: Observable, key: string, compare: (x: K, y: K) => boolean): Observable; +export function distinctUntilKeyChanged(this: Observable, key: string, compare: (x: K, y: K) => boolean): Observable; /* tslint:enable:max-line-length */ /** @@ -64,6 +64,6 @@ export function distinctUntilKeyChanged(this: Observable, key: string, * @method distinctUntilKeyChanged * @owner Observable */ -export function distinctUntilKeyChanged(this: Observable, key: string, compare?: (x: T, y: T) => boolean): Observable { - return higherOrder(key, compare)(this); +export function distinctUntilKeyChanged(this: Observable, key: string, compare?: (x: K, y: K) => boolean): Observable { + return higherOrder(key, compare)(this); } diff --git a/src/internal/operators/distinctUntilKeyChanged.ts b/src/internal/operators/distinctUntilKeyChanged.ts index 3a8e4bf91f8..b9c6cc2fa63 100644 --- a/src/internal/operators/distinctUntilKeyChanged.ts +++ b/src/internal/operators/distinctUntilKeyChanged.ts @@ -3,7 +3,7 @@ import { MonoTypeOperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function distinctUntilKeyChanged(key: string): MonoTypeOperatorFunction; -export function distinctUntilKeyChanged(key: string, compare: (x: K, y: K) => boolean): MonoTypeOperatorFunction; +export function distinctUntilKeyChanged(key: string, compare: (x: K, y: K) => boolean): MonoTypeOperatorFunction; /* tslint:enable:max-line-length */ /** @@ -70,6 +70,6 @@ export function distinctUntilKeyChanged(key: string, compare: (x: K, y: K) * @method distinctUntilKeyChanged * @owner Observable */ -export function distinctUntilKeyChanged(key: string, compare?: (x: T, y: T) => boolean): MonoTypeOperatorFunction { +export function distinctUntilKeyChanged(key: string, compare?: (x: K, y: K) => boolean): MonoTypeOperatorFunction { return distinctUntilChanged((x: T, y: T) => compare ? compare(x[key], y[key]) : x[key] === y[key]); }