Skip to content

Commit

Permalink
fix(typings): fix subscribe overloads
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 committed Nov 6, 2017
1 parent a922087 commit db260f2
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 db260f2

Please sign in to comment.