Pipeable concatAll and mergeAll types broken
See original GitHub issueRxJS version: 5.5.6 Code to reproduce:
import { Observable } from 'rxjs/Observable';
import { of } from 'rxjs/observable/of';
import 'rxjs/add/operator/concatAll';
import { concatAll } from 'rxjs/operators/concatAll';
import 'rxjs/add/operator/mergeAll';
import { mergeAll } from 'rxjs/operators/mergeAll';
import 'rxjs/add/operator/switch';
import { switchAll } from 'rxjs/operators/switchAll';
const prototypeConcatAll: Observable<number> = of(of(1)).concatAll();
const pipeableConcatAll: Observable<number> = of(of(1)).pipe(concatAll()); // Observable<Observable<number>> is not assignable to type Observable<number>
const prototypeMergeAll: Observable<number> = of(of(1)).mergeAll();
const pipeableMergeAll: Observable<number> = of(of(1)).pipe(mergeAll());// Observable<Observable<number>> is not assignable to type Observable<number>
const prototypeSwitchAll: Observable<number> = of(of(1)).switch();
const pipeableSwitchAll: Observable<number> = of(of(1)).pipe(switchAll());
Expected behavior:
concatAll
and mergeAll
pipeable operators transform type Observable<T>
> T
the same as the prototype operators.
Actual behavior:
concatAll
and mergeAll
pass types through Observable<T>
> Observable<t>
.
Additional information:
While concatAll
and mergeAll
are misbehaving, switchAll
is working as expected.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top Results From Across the Web
RxJS Operators
Operators are functions. There are two kinds of operators: Pipeable Operators are the kind that can be piped to Observables using the syntax...
Read more >RxJS mergeMap() with original order - Stack Overflow
It calls shipOrder for each value immediately (so subsequent values may start parallel requests). The second operator, concatAll, puts the ...
Read more >concatAll - Learn RxJS
Collect observables and subscribe to next when previous completes. ; ⚠ Be wary of backpressure when the source emits at a faster pace...
Read more >@reactivex/rxjs | Yarn - Package Manager
types: Resolved an issue where referencing Symbol.observable before RxJS accessed the symbol/observable module internally would result in a reference error.
Read more >Everything You Need to Know About RxJS - Morioh
3 - Operators. Operators are functions of two types in RxJS: Creation or Pipeable. ... import { interval, timer } from 'rxjs'; import...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This can be added to a
typings.d.ts
if you just want to the types to be fixed instead of reexporting the whole function. The same should work forconcatAll
.This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.