Open
Description
I encountered this while updating Angular CLI.
In particular, the update to the base.ts
file in there, where I'm adding as any
was necessary because the spreading of an array of operators into pipe
was not working.
EDIT: It seems that we can't support rest params without breaking inference enforcement from operator to operator in the pipe. So here's a proposal:
Proposed Feature
Add an overload of pipe
that accepts OperatorFunction<any, any>[]
and returns Observable<R>
:
pipe<R>(operations: OperationFunction<any, any>[]): Observable<R>;
// usage
const operations = [map(x => x + x), filter(x => x < 100), mergeMap(n => timer(n))];
of(42).pipe(operations)