Skip to content

Commit

Permalink
Merge pull request #1927 from robwormald/fix-proto
Browse files Browse the repository at this point in the history
fix(operators): export reserved name operators on prototype
  • Loading branch information
jayphelps authored Sep 9, 2016
2 parents 5a498f3 + 34c39dd commit d11b564
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 d11b564

Please sign in to comment.