The Requirement is to return two simple arrays from the localdb.
The function is:
public getCaricamentoVeloceConf(): Observable<any> {
let res = new RespOrdiniGetsceltecaricamentoveloce();
res.tipo = this._WebDBService.Configurazione_CV_Scelte.toArray();
res.ordinamento = this._WebDBService.Configurazione_CV_Ordinamento.toArray();
return Observable.of(res);
}
The error message I get is:
Type 'Promise' is not assignable to type 'Tipo[]'
I think that is because the ToArray() function returns a promise.
Actually what I need is, to compose the res object with the two arrays but I don't know how to combine the two promise toArray() methods
Any solution to this?