mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-12 05:31:41 +00:00
update
This commit is contained in:
28
node_modules/rxjs/operators/race.js
generated
vendored
Normal file
28
node_modules/rxjs/operators/race.js
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
var isArray_1 = require('../util/isArray');
|
||||
var race_1 = require('../observable/race');
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Returns an Observable that mirrors the first source Observable to emit an item
|
||||
* from the combination of this Observable and supplied Observables.
|
||||
* @param {...Observables} ...observables Sources used to race for which Observable emits first.
|
||||
* @return {Observable} An Observable that mirrors the output of the first Observable to emit an item.
|
||||
* @method race
|
||||
* @owner Observable
|
||||
*/
|
||||
function race() {
|
||||
var observables = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
observables[_i - 0] = arguments[_i];
|
||||
}
|
||||
return function raceOperatorFunction(source) {
|
||||
// if the only argument is an array, it was most likely called with
|
||||
// `pair([obs1, obs2, ...])`
|
||||
if (observables.length === 1 && isArray_1.isArray(observables[0])) {
|
||||
observables = observables[0];
|
||||
}
|
||||
return source.lift.call(race_1.race.apply(void 0, [source].concat(observables)));
|
||||
};
|
||||
}
|
||||
exports.race = race;
|
||||
//# sourceMappingURL=race.js.map
|
Reference in New Issue
Block a user