Skip to content

Commit

Permalink
fix(operators): export reserved name operators on prototype
Browse files Browse the repository at this point in the history
closes #1924
  • Loading branch information
robwormald authored and jayphelps committed Sep 9, 2016
1 parent 5a498f3 commit 34c39dd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/add/operator/catch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import { Observable } from '../../Observable';
import { _catch, CatchSignature } from '../../operator/catch';

Observable.prototype.catch = _catch;
Observable.prototype._catch = _catch;

declare module '../../Observable' {
interface Observable<T> {
catch: CatchSignature<T>;
_catch: CatchSignature<T>;
}
}
2 changes: 2 additions & 0 deletions src/add/operator/do.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import { Observable } from '../../Observable';
import { _do, DoSignature } from '../../operator/do';

Observable.prototype.do = _do;
Observable.prototype._do = _do;

declare module '../../Observable' {
interface Observable<T> {
do: DoSignature<T>;
_do: DoSignature<T>;
}
}
2 changes: 2 additions & 0 deletions src/add/operator/finally.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import { Observable } from '../../Observable';
import { _finally, FinallySignature } from '../../operator/finally';

Observable.prototype.finally = _finally;
Observable.prototype._finally = _finally;

declare module '../../Observable' {
interface Observable<T> {
finally: FinallySignature<T>;
_finally: FinallySignature<T>;
}
}
2 changes: 2 additions & 0 deletions src/add/operator/switch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import { Observable } from '../../Observable';
import { _switch, SwitchSignature } from '../../operator/switch';

Observable.prototype.switch = _switch;
Observable.prototype._switch = _switch;

declare module '../../Observable' {
interface Observable<T> {
switch: SwitchSignature<T>;
_switch: SwitchSignature<T>;
}
}

0 comments on commit 34c39dd

Please sign in to comment.