I am just curious, what will be the correct type of Observables array?
I tried:
let myObservables: Observable[] = new Array();
let myObservables: Observable<Array<any>> = new Array();
let myObservables: Observable<[]> = new Array();
but none of them are working.
I just want an array in which i can push observables so that i can pass it to Observable.forkJoin(myObservables)
Okay i found it. The following are two correct ways to do it:
let myObservables: Observable<any>[] = new Array();
let myObservables: Array<Observable<any>> = new Array();
If anyone finds it helpful :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With