combineLatest.d.ts 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import { ObservableInput } from '../Observable';
  2. import { Operator } from '../Operator';
  3. import { Subscriber } from '../Subscriber';
  4. import { OuterSubscriber } from '../OuterSubscriber';
  5. import { InnerSubscriber } from '../InnerSubscriber';
  6. import { OperatorFunction } from '../interfaces';
  7. export declare function combineLatest<T, R>(project: (v1: T) => R): OperatorFunction<T, R>;
  8. export declare function combineLatest<T, T2, R>(v2: ObservableInput<T2>, project: (v1: T, v2: T2) => R): OperatorFunction<T, R>;
  9. export declare function combineLatest<T, T2, T3, R>(v2: ObservableInput<T2>, v3: ObservableInput<T3>, project: (v1: T, v2: T2, v3: T3) => R): OperatorFunction<T, R>;
  10. export declare function combineLatest<T, T2, T3, T4, R>(v2: ObservableInput<T2>, v3: ObservableInput<T3>, v4: ObservableInput<T4>, project: (v1: T, v2: T2, v3: T3, v4: T4) => R): OperatorFunction<T, R>;
  11. export declare function combineLatest<T, T2, T3, T4, T5, R>(v2: ObservableInput<T2>, v3: ObservableInput<T3>, v4: ObservableInput<T4>, v5: ObservableInput<T5>, project: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => R): OperatorFunction<T, R>;
  12. export declare function combineLatest<T, T2, T3, T4, T5, T6, R>(v2: ObservableInput<T2>, v3: ObservableInput<T3>, v4: ObservableInput<T4>, v5: ObservableInput<T5>, v6: ObservableInput<T6>, project: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6) => R): OperatorFunction<T, R>;
  13. export declare function combineLatest<T, T2>(v2: ObservableInput<T2>): OperatorFunction<T, [T, T2]>;
  14. export declare function combineLatest<T, T2, T3>(v2: ObservableInput<T2>, v3: ObservableInput<T3>): OperatorFunction<T, [T, T2, T3]>;
  15. export declare function combineLatest<T, T2, T3, T4>(v2: ObservableInput<T2>, v3: ObservableInput<T3>, v4: ObservableInput<T4>): OperatorFunction<T, [T, T2, T3, T4]>;
  16. export declare function combineLatest<T, T2, T3, T4, T5>(v2: ObservableInput<T2>, v3: ObservableInput<T3>, v4: ObservableInput<T4>, v5: ObservableInput<T5>): OperatorFunction<T, [T, T2, T3, T4, T5]>;
  17. export declare function combineLatest<T, T2, T3, T4, T5, T6>(v2: ObservableInput<T2>, v3: ObservableInput<T3>, v4: ObservableInput<T4>, v5: ObservableInput<T5>, v6: ObservableInput<T6>): OperatorFunction<T, [T, T2, T3, T4, T5, T6]>;
  18. export declare function combineLatest<T, R>(...observables: Array<ObservableInput<T> | ((...values: Array<T>) => R)>): OperatorFunction<T, R>;
  19. export declare function combineLatest<T, R>(array: ObservableInput<T>[]): OperatorFunction<T, Array<T>>;
  20. export declare function combineLatest<T, TOther, R>(array: ObservableInput<TOther>[], project: (v1: T, ...values: Array<TOther>) => R): OperatorFunction<T, R>;
  21. export declare class CombineLatestOperator<T, R> implements Operator<T, R> {
  22. private project;
  23. constructor(project?: (...values: Array<any>) => R);
  24. call(subscriber: Subscriber<R>, source: any): any;
  25. }
  26. /**
  27. * We need this JSDoc comment for affecting ESDoc.
  28. * @ignore
  29. * @extends {Ignored}
  30. */
  31. export declare class CombineLatestSubscriber<T, R> extends OuterSubscriber<T, R> {
  32. private project;
  33. private active;
  34. private values;
  35. private observables;
  36. private toRespond;
  37. constructor(destination: Subscriber<R>, project?: (...values: Array<any>) => R);
  38. protected _next(observable: any): void;
  39. protected _complete(): void;
  40. notifyComplete(unused: Subscriber<R>): void;
  41. notifyNext(outerValue: T, innerValue: R, outerIndex: number, innerIndex: number, innerSub: InnerSubscriber<T, R>): void;
  42. private _tryProject(values);
  43. }