From 0e2afc58ecc415b6d30636c7a338e56e178aa598 Mon Sep 17 00:00:00 2001 From: OJ Kwon Date: Wed, 14 Dec 2016 16:45:05 -0800 Subject: [PATCH] fix(Observable): align type definition of subscriber with Observable - closes #2166 --- src/Observable.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Observable.ts b/src/Observable.ts index 38e15ef0b8..e3c681bae0 100644 --- a/src/Observable.ts +++ b/src/Observable.ts @@ -37,7 +37,7 @@ export class Observable implements Subscribable { * 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?: (this: Observable, subscriber: Subscriber) => TeardownLogic) { + constructor(subscribe?: (this: Observable, subscriber: Subscriber) => TeardownLogic) { if (subscribe) { this._subscribe = subscribe; } @@ -53,7 +53,7 @@ export class Observable implements Subscribable { * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor * @return {Observable} a new cold observable */ - static create: Function = (subscribe?: (subscriber: Subscriber) => TeardownLogic) => { + static create: Function = (subscribe?: (subscriber: Subscriber) => TeardownLogic) => { return new Observable(subscribe); };