Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
Draft: remove usages of toSubscriber()
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Mendes <[email protected]>
  • Loading branch information
juanmendes committed Dec 21, 2022
1 parent 856c8a0 commit 05f3437
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 05f3437

Please sign in to comment.