Исправлена ​​часть getIds (), но теперь я получаю,

ичок в Angular и спотыкаюсь об этом. getIds возвращает массив идентификаторов, а затем мы создаем Observable (getNames) для каждого из этих идентификаторов.

interface Name{
    "Id": string;
    "": string;
    "cve_link": string;
    "cve_description": string;
    "cve_applications": string;
    "cve_hosts": string;
    }
export interface Vulns extends Array<Vuln>{}

getIds(): void {
 this.cvetservice
     .getIds().pipe(
     mergeMap(names => this.getNames(this.ids)),
     mergeMap(names => names),
     toArray()
     )
}

getNames(data: Ids):Observable<any[]> {
 return this.http
    .post(url,data)
    .pipe(map(({ Results }: any) => Results[0].results.map(item => ({Id: item.Id, Name: item.Name }))));
    }

Линия 133mergeMap(names => names) не компилируется (ошибка ниже).

ERROR in src/app/mcomponent.ts(133,19): error TS2345: Argument of type '(names: Name) => Name' is not assignable to parameter of type '(value: Name, index: number) => ObservableInput<{}>'.
Type 'Name' is not assignable to type 'ObservableInput<{}>'.
Type 'Name' is not assignable to type 'Iterable<{}>'.
Property '[Symbol.iterator]' is missing in type 'Name'.
src/app/mcomponent.ts(138,28): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value.

Может кто-нибудь помочь уточнить, что я здесь делаю не так?

Ответы на вопрос(1)

Ваш ответ на вопрос