mergeMap.d.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { ObservableInput } from '../Observable';
  2. import { Operator } from '../Operator';
  3. import { Subscriber } from '../Subscriber';
  4. import { Subscription } from '../Subscription';
  5. import { OuterSubscriber } from '../OuterSubscriber';
  6. import { InnerSubscriber } from '../InnerSubscriber';
  7. import { OperatorFunction } from '../interfaces';
  8. export declare function mergeMap<T, R>(project: (value: T, index: number) => ObservableInput<R>, concurrent?: number): OperatorFunction<T, R>;
  9. export declare function mergeMap<T, I, R>(project: (value: T, index: number) => ObservableInput<I>, resultSelector: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R, concurrent?: number): OperatorFunction<T, R>;
  10. export declare class MergeMapOperator<T, I, R> implements Operator<T, I> {
  11. private project;
  12. private resultSelector;
  13. private concurrent;
  14. constructor(project: (value: T, index: number) => ObservableInput<I>, resultSelector?: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R, concurrent?: number);
  15. call(observer: Subscriber<I>, source: any): any;
  16. }
  17. /**
  18. * We need this JSDoc comment for affecting ESDoc.
  19. * @ignore
  20. * @extends {Ignored}
  21. */
  22. export declare class MergeMapSubscriber<T, I, R> extends OuterSubscriber<T, I> {
  23. private project;
  24. private resultSelector;
  25. private concurrent;
  26. private hasCompleted;
  27. private buffer;
  28. private active;
  29. protected index: number;
  30. constructor(destination: Subscriber<I>, project: (value: T, index: number) => ObservableInput<I>, resultSelector?: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R, concurrent?: number);
  31. protected _next(value: T): void;
  32. protected _tryNext(value: T): void;
  33. private _innerSub(ish, value, index);
  34. protected _complete(): void;
  35. notifyNext(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number, innerSub: InnerSubscriber<T, I>): void;
  36. private _notifyResultSelector(outerValue, innerValue, outerIndex, innerIndex);
  37. notifyComplete(innerSub: Subscription): void;
  38. }