Skip to content

Commit

Permalink
feat(MapTo): adjust to more private variables
Browse files Browse the repository at this point in the history
  • Loading branch information
TylorS authored and Andre Medeiros committed Mar 28, 2016
1 parent 58c83f9 commit a5ed5ab
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/operator/MapToOperator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import {Stream} from '../Stream';
import {emptyListener} from '../utils/emptyListener';

export class Proxy<T, R> implements InternalListener<T> {
constructor(public out: Stream<R>,
public op: MapToOperator<T, R>) {
constructor(private out: Stream<R>,
private value: R) {
}

_n(t: T) {
this.out._n(this.op.projectedValue);
this.out._n(this.value);
}

_e(err: any) {
Expand All @@ -22,14 +22,14 @@ export class Proxy<T, R> implements InternalListener<T> {
}

export class MapToOperator<T, R> implements Operator<T, R> {
public proxy: InternalListener<T> = emptyListener;
private proxy: InternalListener<T> = emptyListener;

constructor(public projectedValue: R,
constructor(private projectedValue: R,
public ins: Stream<T>) {
}

_start(out: Stream<R>): void {
this.ins._add(this.proxy = new Proxy(out, this));
this.ins._add(this.proxy = new Proxy(out, this.projectedValue));
}

_stop(): void {
Expand Down

0 comments on commit a5ed5ab

Please sign in to comment.