combineLatest.js 679 B

123456789101112131415
  1. import { combineLatestInit } from '../observable/combineLatest';
  2. import { operate } from '../util/lift';
  3. import { argsOrArgArray } from '../util/argsOrArgArray';
  4. import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';
  5. import { pipe } from '../util/pipe';
  6. import { popResultSelector } from '../util/args';
  7. export function combineLatest(...args) {
  8. const resultSelector = popResultSelector(args);
  9. return resultSelector
  10. ? pipe(combineLatest(...args), mapOneOrManyArgs(resultSelector))
  11. : operate((source, subscriber) => {
  12. combineLatestInit([source, ...argsOrArgArray(args)])(subscriber);
  13. });
  14. }
  15. //# sourceMappingURL=combineLatest.js.map