Skip to content

Commit

Permalink
chore(util): Add comment re: empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
cartant committed Jun 22, 2017
1 parent 88fd57f commit 7a2cf50
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions source/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ export function isObservable(arg: any): arg is Observable<any> {
return arg && arg.subscribe;
}

// This is included because - although there is an "rxjs/Observer.js" in the
// RxJS NPM distribution - there is no "Rx.Observer" (and, therefore, no
// "Rx.Observer.empty") in the bundle:

const empty = {
closed: true,
error(error: any): void { throw error; },
next(value: any): void { },
complete(): void { }
next(value: any): void {},
complete(): void {}
};

// https://github.com/ReactiveX/rxjs/blob/master/src/util/toSubscriber.ts
Expand Down

0 comments on commit 7a2cf50

Please sign in to comment.