Bug Report
Current Behavior
const input: Observable<number> = of(1, 2, 3)
const output = input.pipe(switchAll())
output.subscribe(value => console.log(value))
No type error, but runtime error:
You provided '1' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
Reproduction
Expected behavior
This should give a type error like number is not assignable to ObservableInput<T>
Environment
Possible Solution
I tried a few things, but it seems like type inference just fails here. TypeScript needs to infer a type based on the usage of the return value here.
Workaround
Use switchMap(x => x) instead (switchMap(identity) also breaks inference)