Skip to content

Commit

Permalink
fix(core): fix observable producer
Browse files Browse the repository at this point in the history
subscribe returns a Subscription and not a function
  • Loading branch information
TylorS committed Sep 15, 2016
1 parent 8fe7069 commit 0229338
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1067,19 +1067,19 @@ class ObservableProducer<T> implements InternalProducer<T> {
public type = 'fromObservable';
public ins: any;
public out: Stream<T>;
private _unsusbcribe: () => void;
private _subscription: { unsubscribe: () => void; };

constructor (observable: any) {
this.ins = observable;
}

_start (out: Stream<T>) {
this.out = out;
this._unsusbcribe = this.ins.subscribe(new ObservableListener(out));
this._subscription = this.ins.subscribe(new ObservableListener(out));
}

_stop () {
this._unsusbcribe();
this._subscription.unsubscribe();
}
}

Expand Down Expand Up @@ -2111,7 +2111,7 @@ export class MemoryStream<T> extends Stream<T> {
}
}

class Subscription<T> {
export class Subscription<T> {
constructor (private _stream: Stream<T>, private _listener: Listener<T>) {}

unsubscribe (): void {
Expand Down

0 comments on commit 0229338

Please sign in to comment.