Skip to content

Commit

Permalink
fix(Observable): align type definition of subscriber with Observable
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Dec 15, 2016
1 parent 5f93f81 commit e52d014
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/operators/groupBy-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,7 @@ describe('Observable.prototype.groupBy', () => {
observer.complete();
}).groupBy(
(x: number) => x % 2,
(x: string) => x + '!'
(x: number) => x + '!'
);

expect(result instanceof MyCustomObservable).to.be.true;
Expand Down
4 changes: 2 additions & 2 deletions src/Observable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class Observable<T> implements Subscribable<T> {
* can be `next`ed, or an `error` method can be called to raise an error, or
* `complete` can be called to notify of a successful completion.
*/
constructor(subscribe?: <R>(this: Observable<T>, subscriber: Subscriber<R>) => TeardownLogic) {
constructor(subscribe?: (this: Observable<T>, subscriber: Subscriber<T>) => TeardownLogic) {
if (subscribe) {
this._subscribe = subscribe;
}
Expand All @@ -53,7 +53,7 @@ export class Observable<T> implements Subscribable<T> {
* @param {Function} subscribe? the subscriber function to be passed to the Observable constructor
* @return {Observable} a new cold observable
*/
static create: Function = <T>(subscribe?: <R>(subscriber: Subscriber<R>) => TeardownLogic) => {
static create: Function = <T>(subscribe?: (subscriber: Subscriber<T>) => TeardownLogic) => {
return new Observable<T>(subscribe);
};

Expand Down

0 comments on commit e52d014

Please sign in to comment.