Having trouble getting concatMap to make the first query for a user id and then use the id for a second query.
This is how how the docs explain its usage but examples demonstrating this working don't seem to exist.
this.authenticationService.currentUser.pipe(
concatMap((principal: Principal) => {
this.getUser(principal.id: String)
})
).subscribe((user: User) => {
console.log(user);
});
This is all red in VSC.
[ts]
Argument of type '(principal: Principal) => void' is not assignable to parameter of type '(value: Principal, index: number) => ObservableInput<{}>'.
Type 'void' is not assignable to type 'ObservableInput<{}>'. [2345]
(parameter) principal: Principal
Can someone help me make sense of this? I believe it may be because of TS 2.7+ no null returns checking.