I recently updated my version of angular using ng update
and when running ng lint
I am getting the error create is deprecated: use
observableSubscription: Subscription;
Creating Custom Observable
const observer = new Observable((observer: Observer) => {
observer.next();
observer.error();
observer.complete();
});
Subscribing To Custom Observable
this.observableSubscription = observer.subscribe((data:any) => {
console.log(data);
})
Unsubscribing
this.observableSubscription.unsubscribe();