Skip to content

Commit

Permalink
fix(typings): fix subscribe overloads (#3053)
Browse files Browse the repository at this point in the history
Remove the no-arg overload. If not removed, any Observable will be
compatible with any ObservableInput regardless of type - as T does not
appear in the no-arg overload.

Closes #3052
  • Loading branch information
cartant authored and benlesh committed Dec 1, 2017
1 parent 7d722d4 commit 1a9fd42
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Observable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ export class Observable<T> implements Subscribable<T> {
return observable;
}

subscribe(): Subscription;
subscribe(observer: PartialObserver<T>): Subscription;
subscribe(observer?: PartialObserver<T>): Subscription;
subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Subscription;
/**
* Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.
Expand Down

0 comments on commit 1a9fd42

Please sign in to comment.