diff --git a/src/operator/debounceTime.ts b/src/operator/debounceTime.ts index 529617b758..e718727b46 100644 --- a/src/operator/debounceTime.ts +++ b/src/operator/debounceTime.ts @@ -20,7 +20,7 @@ class DebounceTimeOperator implements Operator { class DebounceTimeSubscriber extends Subscriber { private debouncedSubscription: Subscription = null; - private lastValue: any = null; + private lastValue: T = null; constructor(destination: Subscriber, private dueTime: number, @@ -41,7 +41,8 @@ class DebounceTimeSubscriber extends Subscriber { debouncedNext(): void { this.clearDebounce(); - if (this.lastValue != null) { + + if (this.lastValue !== null) { this.destination.next(this.lastValue); this.lastValue = null; }