I have following code
const mySource:Observable<Observable<any>[]>
(...)
mySource.pipe(
switchMap(arr=>forkJoin(arr));
)
which works as expected, but
mySource.pipe(
switchMap(forkJoin);
)
fails with
REST error TypeError: You provided '0' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
RxJS 31
subscribeTo
from
forkJoinInternal
_trySubscribe
subscribe
innerSubscribe
_innerSub
Why is the second variant not working?
Stackblitz: https://stackblitz.com/edit/typescript-tztgpl?file=index.ts
Keep in mind that this is a runtime error, not an IDE related stuff.