You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
2.2 KiB
1 line
2.2 KiB
2 years ago
|
{"version":3,"file":"race.js","sourceRoot":"","sources":["../../src/operators/race.ts"],"names":[],"mappings":";AACA,wBAAwB,iBAAiB,CAAC,CAAA;AAE1C,qBAAmC,oBAAoB,CAAC,CAAA;AAOxD,mCAAmC;AAEnC;;;;;;;GAOG;AACH;IAAwB,qBAA2D;SAA3D,WAA2D,CAA3D,sBAA2D,CAA3D,IAA2D;QAA3D,oCAA2D;;IACjF,MAAM,CAAC,8BAA8B,MAAqB;QACxD,mEAAmE;QACnE,4BAA4B;QAC5B,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,iBAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACxD,WAAW,GAAyB,WAAW,CAAC,CAAC,CAAC,CAAC;QACrD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAU,gBAAI,MAAM,SAAK,WAAW,EAAC,CAAC,CAAC;IACjE,CAAC,CAAC;AACJ,CAAC;AAVe,YAAI,OAUnB,CAAA","sourcesContent":["import { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { MonoTypeOperatorFunction, OperatorFunction } from '../interfaces';\nimport { race as raceStatic } from '../observable/race';\n\n/* tslint:disable:max-line-length */\nexport function race<T>(observables: Array<Observable<T>>): MonoTypeOperatorFunction<T>;\nexport function race<T, R>(observables: Array<Observable<T>>): OperatorFunction<T, R>;\nexport function race<T>(...observables: Array<Observable<T> | Array<Observable<T>>>): MonoTypeOperatorFunction<T>;\nexport function race<T, R>(...observables: Array<Observable<any> | Array<Observable<any>>>): OperatorFunction<T, R>;\n/* tslint:enable:max-line-length */\n\n/**\n * Returns an Observable that mirrors the first source Observable to emit an item\n * from the combination of this Observable and supplied Observables.\n * @param {...Observables} ...observables Sources used to race for which Observable emits first.\n * @return {Observable} An Observable that mirrors the output of the first Observable to emit an item.\n * @method race\n * @owner Observable\n */\nexport function race<T>(...observables: Array<Observable<T> | Array<Observable<T>>>): MonoTypeOperatorFunction<T> {\n return function raceOperatorFunction(source: Observable<T>) {\n // if the only argument is an array, it was most likely called with\n // `pair([obs1, obs2, ...])`\n if (observables.length === 1 && isArray(observables[0])) {\n observables = <Array<Observable<T>>>observables[0];\n }\n\n return source.lift.call(raceStatic<T>(source, ...observables));\n };\n}"]}
|