raceWith.js 567 B

12345678910111213141516
  1. import { __read, __spreadArray } from "tslib";
  2. import { raceInit } from '../observable/race';
  3. import { operate } from '../util/lift';
  4. import { identity } from '../util/identity';
  5. export function raceWith() {
  6. var otherSources = [];
  7. for (var _i = 0; _i < arguments.length; _i++) {
  8. otherSources[_i] = arguments[_i];
  9. }
  10. return !otherSources.length
  11. ? identity
  12. : operate(function (source, subscriber) {
  13. raceInit(__spreadArray([source], __read(otherSources)))(subscriber);
  14. });
  15. }
  16. //# sourceMappingURL=raceWith.js.map