From 05f3437c7538af873cac9155f15cfa85f7ce4b41 Mon Sep 17 00:00:00 2001 From: Juan Mendes Date: Tue, 20 Dec 2022 22:35:01 -0500 Subject: [PATCH] Draft: remove usages of toSubscriber() Signed-off-by: Juan Mendes --- .../src/common/subscription/subscription-tracker.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/projects/components/src/common/subscription/subscription-tracker.ts b/projects/components/src/common/subscription/subscription-tracker.ts index e074c06f6..c56bc7e85 100644 --- a/projects/components/src/common/subscription/subscription-tracker.ts +++ b/projects/components/src/common/subscription/subscription-tracker.ts @@ -4,8 +4,7 @@ */ import { Injectable, OnDestroy } from '@angular/core'; -import { Observable, PartialObserver, Subscription } from 'rxjs'; -import { toSubscriber } from 'rxjs/internal-compatibility'; +import { Observable, PartialObserver, Subscriber, Subscription } from 'rxjs'; /** * An interface that knows how to subscribe and unsubscribe from observables. @@ -46,7 +45,7 @@ export class SubscriptionTracker implements ISubscriptionTracker, OnDestroy { error?: (error: any) => void, complete?: () => void ): Subscription { - const subscription = observable.subscribe(toSubscriber(observerOrNext, error, complete)); + const subscription = observable.subscribe(new Subscriber(observerOrNext, error, complete)); this.subscriptions.push(subscription); return subscription; }