Code coverage report for src/operator/zip-static.ts

Statements: 100% (9 / 9)      Branches: 100% (2 / 2)      Functions: 100% (1 / 1)      Lines: 100% (7 / 7)      Ignored: none     

All files » src/operator/ » zip-static.ts
1 2 3 4 5 6 7 8 9 10 11 12  1 1   292 88 88 18   88    
import {Observable} from '../Observable';
import {ArrayObservable} from '../observable/fromArray';
import {ZipOperator} from './zip-support';
 
export function zip<T, R>(...observables: Array<Observable<any> | ((...values: Array<any>) => R)>): Observable<R> {
  const project = <((...ys: Array<any>) => R)> observables[observables.length - 1];
  if (typeof project === 'function') {
    observables.pop();
  }
  return new ArrayObservable(observables).lift(new ZipOperator(project));
}