0d4b8911cd0aa35c725ac0f74b882bce6daed16a6153bbc28ed3096cba155c15414b8e8f37de82c1e5a93a9393c6e829e1ddce5888ffe5b125db5cdab595c0 1.1 KB

1234567891011121314151617181920
  1. import { ObservableInputTuple, OperatorFunction } from '../types';
  2. import { argsOrArgArray } from '../util/argsOrArgArray';
  3. import { raceWith } from './raceWith';
  4. /** @deprecated Replaced with {@link raceWith}. Will be removed in v8. */
  5. export function race<T, A extends readonly unknown[]>(otherSources: [...ObservableInputTuple<A>]): OperatorFunction<T, T | A[number]>;
  6. /** @deprecated Replaced with {@link raceWith}. Will be removed in v8. */
  7. export function race<T, A extends readonly unknown[]>(...otherSources: [...ObservableInputTuple<A>]): OperatorFunction<T, T | A[number]>;
  8. /**
  9. * Returns an Observable that mirrors the first source Observable to emit a next,
  10. * error or complete notification from the combination of this Observable and supplied Observables.
  11. * @param args Sources used to race for which Observable emits first.
  12. * @return A function that returns an Observable that mirrors the output of the
  13. * first Observable to emit an item.
  14. * @deprecated Replaced with {@link raceWith}. Will be removed in v8.
  15. */
  16. export function race<T>(...args: any[]): OperatorFunction<T, unknown> {
  17. return raceWith(...argsOrArgArray(args));
  18. }