I think I have a misunderstanding on how works RxJS with an array when I receive it from an HTTP call.
For example I have:
public getNews(): Observable<News[]> {
return this.http.get<News[]>("/news");
}
And after I want to use a simple map on it:
this.newsService.getNews().pipe(map(news => {
return {
// DO SOMETHING HERE WITH NEWS
};
}));
The problem is the type of my param, Typescript told me its a array of News but it's inside a map so normally it has to of type News right?
I don't know If I'm clear, but if someone can explain me it would be great :)