@reactivex/ix-esnext-esm
Version:
The Interactive Extensions for JavaScript
16 lines (14 loc) • 526 B
JavaScript
import { RaceAsyncIterable } from '../race';
/**
* Propagates the async sequence that reacts first.
*
* @export
* @param {...AsyncIterable<T>[]} sources The source sequences.
* @return {MonoTypeOperatorAsyncFunction<TSource> } An async sequence that surfaces either of the given sequences, whichever reacted first.
*/
export function raceWith(...sources) {
return function raceWithOperatorFunction(source) {
return new RaceAsyncIterable([source, ...sources]);
};
}
//# sourceMappingURL=racewith.mjs.map