I have an error: Type 'Observable' is not assignable to type 'Observable'. Type 'Object' is not assignable to type 'boolean'.
deleteUser(userId: string): Observable<boolean> {
return this.httpClient
.delete(url, this.getHttpOptions())
.map(res => {
return res;
})
.catch(this.handleError);
}
I got the type of res as a boolean when I tried to print it.
return this.httpClient.delete<boolean>(...)
, and you won't need themap
– David