Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(zip): remove unused 'ZipBufferIterator.index' #2067

Merged
merged 2 commits into from Nov 4, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/operator/zip.ts
Expand Up @@ -93,7 +93,6 @@ export class ZipOperator<T, R> implements Operator<T, R> {
* @extends {Ignored}
*/
export class ZipSubscriber<T, R> extends Subscriber<T> {
private index = 0;
private values: any;
private project: (...values: Array<any>) => R;
private iterators: LookAheadIterator<any>[] = [];
Expand All @@ -109,13 +108,12 @@ export class ZipSubscriber<T, R> extends Subscriber<T> {

protected _next(value: any) {
const iterators = this.iterators;
const index = this.index++;
if (isArray(value)) {
iterators.push(new StaticArrayIterator(value));
} else if (typeof value[$$iterator] === 'function') {
iterators.push(new StaticIterator(value[$$iterator]()));
} else {
iterators.push(new ZipBufferIterator(this.destination, this, value, index));
iterators.push(new ZipBufferIterator(this.destination, this, value));
}
}

Expand Down Expand Up @@ -263,8 +261,7 @@ class ZipBufferIterator<T, R> extends OuterSubscriber<T, R> implements LookAhead

constructor(destination: PartialObserver<T>,
private parent: ZipSubscriber<T, R>,
private observable: Observable<T>,
private index: number) {
private observable: Observable<T>) {
super(destination);
}

Expand Down