Skip to content

Commit 0e2afc5

Browse files
committed
fix(Observable): align type definition of subscriber with Observable
- closes #2166
1 parent 5f93f81 commit 0e2afc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Observable.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class Observable<T> implements Subscribable<T> {
3737
* can be `next`ed, or an `error` method can be called to raise an error, or
3838
* `complete` can be called to notify of a successful completion.
3939
*/
40-
constructor(subscribe?: <R>(this: Observable<T>, subscriber: Subscriber<R>) => TeardownLogic) {
40+
constructor(subscribe?: (this: Observable<T>, subscriber: Subscriber<T>) => TeardownLogic) {
4141
if (subscribe) {
4242
this._subscribe = subscribe;
4343
}
@@ -53,7 +53,7 @@ export class Observable<T> implements Subscribable<T> {
5353
* @param {Function} subscribe? the subscriber function to be passed to the Observable constructor
5454
* @return {Observable} a new cold observable
5555
*/
56-
static create: Function = <T>(subscribe?: <R>(subscriber: Subscriber<R>) => TeardownLogic) => {
56+
static create: Function = <T>(subscribe?: (subscriber: Subscriber<T>) => TeardownLogic) => {
5757
return new Observable<T>(subscribe);
5858
};
5959

0 commit comments

Comments
 (0)