TypeScript – wait for an observable/promise to finish, and return observable
The problem is that we convert observable into different type… with .subscribe – while we should not (it does not return observable) public makeRequest = (): Observable<any> => { return this.myObservable().subscribe( … // this is wrong, we cannot return .subscribe // because it consumes observable and returns ISusbcriber ); } When we have an observable… … Read more