Skip to content

Commit

Permalink
refactor(InnerSubscriber): add getter for outerIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
luisgabriel committed Mar 2, 2016
1 parent 72d96bb commit 80e2067
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/InnerSubscriber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ import {OuterSubscriber} from './OuterSubscriber';
export class InnerSubscriber<T, R> extends Subscriber<R> {
private index: number = 0;

constructor(private parent: OuterSubscriber<T, R>, private outerValue: T, private outerIndex: number) {
constructor(private parent: OuterSubscriber<T, R>, private outerValue: T, private _outerIndex: number) {
super();
}

get outerIndex(): number {
return this._outerIndex;
}

protected _next(value: R): void {
this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
}
Expand Down

0 comments on commit 80e2067

Please sign in to comment.