| 1 |
import { __read, __spreadArray } from "tslib"; |
| 2 |
import { combineLatestInit } from '../observable/combineLatest'; |
| 3 |
import { operate } from '../util/lift'; |
| 4 |
import { argsOrArgArray } from '../util/argsOrArgArray'; |
| 5 |
import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; |
| 6 |
import { pipe } from '../util/pipe'; |
| 7 |
import { popResultSelector } from '../util/args'; |
| 8 |
export function combineLatest() { |
| 9 |
var args = []; |
| 10 |
for (var _i = 0; _i < arguments.length; _i++) { |
| 11 |
args[_i] = arguments[_i]; |
| 12 |
} |
| 13 |
var resultSelector = popResultSelector(args); |
| 14 |
return resultSelector |
| 15 |
? pipe(combineLatest.apply(void 0, __spreadArray([], __read(args))), mapOneOrManyArgs(resultSelector)) |
| 16 |
: operate(function (source, subscriber) { |
| 17 |
combineLatestInit(__spreadArray([source], __read(argsOrArgArray(args))))(subscriber); |
| 18 |
}); |
| 19 |
} |
| 20 |
//# sourceMappingURL=combineLatest.js.map |