Code coverage report for src/InnerSubscriber.ts

Statements: 100% (18 / 18)      Branches: 100% (0 / 0)      Functions: 100% (5 / 5)      Lines: 100% (13 / 13)      Ignored: none     

All files » src/ » InnerSubscriber.ts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 231     1 1634   1634 1634     1 2711 2711     1 177     1 1032   1
import {Subscriber} from './Subscriber';
import {OuterSubscriber} from './OuterSubscriber';
 
export class InnerSubscriber<T, R> extends Subscriber<R> {
  index: number = 0;
 
  constructor(private parent: OuterSubscriber<T, R>, private outerValue: T, private outerIndex: number) {
    super();
  }
 
  _next(value: R) {
    const index = this.index++;
    this.parent.notifyNext(this.outerValue, value, this.outerIndex, index);
  }
 
  _error(error: any) {
    this.parent.notifyError(error, this);
  }
 
  _complete() {
    this.parent.notifyComplete(this);
  }
}