I can really find no words for what I want to do. So I just show my attempt..This is what I tried:
register(): Observable<boolean> {
return this.registerNew().pipe(
map(userData => {
return this.updateProfile().pipe( (*1)
map(profileData => {
return profileData ? true : false;
}))
}))
}
But of course I get the following error message:
Type 'Observable<false | Observable<boolean>>' is not assignable to type 'Observable<boolean>'.
I am also thinking about using await instead of return in the line which I marked with (*1).
But still I can't get it to work in a nice way.
.flatMap?