race.d.ts 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { Observable } from '../Observable';
  2. import { Operator } from '../Operator';
  3. import { Subscriber } from '../Subscriber';
  4. import { TeardownLogic, ObservableInput } from '../types';
  5. import { OuterSubscriber } from '../OuterSubscriber';
  6. export declare function race<A>(arg: [ObservableInput<A>]): Observable<A>;
  7. export declare function race<A, B>(arg: [ObservableInput<A>, ObservableInput<B>]): Observable<A | B>;
  8. export declare function race<A, B, C>(arg: [ObservableInput<A>, ObservableInput<B>, ObservableInput<C>]): Observable<A | B | C>;
  9. export declare function race<A, B, C, D>(arg: [ObservableInput<A>, ObservableInput<B>, ObservableInput<C>, ObservableInput<D>]): Observable<A | B | C | D>;
  10. export declare function race<A, B, C, D, E>(arg: [ObservableInput<A>, ObservableInput<B>, ObservableInput<C>, ObservableInput<D>, ObservableInput<E>]): Observable<A | B | C | D | E>;
  11. export declare function race<T>(arg: ObservableInput<T>[]): Observable<T>;
  12. export declare function race(arg: ObservableInput<any>[]): Observable<{}>;
  13. export declare function race<A>(a: ObservableInput<A>): Observable<A>;
  14. export declare function race<A, B>(a: ObservableInput<A>, b: ObservableInput<B>): Observable<A | B>;
  15. export declare function race<A, B, C>(a: ObservableInput<A>, b: ObservableInput<B>, c: ObservableInput<C>): Observable<A | B | C>;
  16. export declare function race<A, B, C, D>(a: ObservableInput<A>, b: ObservableInput<B>, c: ObservableInput<C>, d: ObservableInput<D>): Observable<A | B | C | D>;
  17. export declare function race<A, B, C, D, E>(a: ObservableInput<A>, b: ObservableInput<B>, c: ObservableInput<C>, d: ObservableInput<D>, e: ObservableInput<E>): Observable<A | B | C | D | E>;
  18. export declare function race<T>(observables: ObservableInput<T>[]): Observable<T>;
  19. export declare function race(observables: ObservableInput<any>[]): Observable<{}>;
  20. export declare function race<T>(...observables: ObservableInput<T>[]): Observable<T>;
  21. export declare function race(...observables: ObservableInput<any>[]): Observable<{}>;
  22. export declare class RaceOperator<T> implements Operator<T, T> {
  23. call(subscriber: Subscriber<T>, source: any): TeardownLogic;
  24. }
  25. /**
  26. * We need this JSDoc comment for affecting ESDoc.
  27. * @ignore
  28. * @extends {Ignored}
  29. */
  30. export declare class RaceSubscriber<T> extends OuterSubscriber<T, T> {
  31. private hasFirst;
  32. private observables;
  33. private subscriptions;
  34. constructor(destination: Subscriber<T>);
  35. protected _next(observable: any): void;
  36. protected _complete(): void;
  37. notifyNext(_outerValue: T, innerValue: T, outerIndex: number): void;
  38. }