Skip to content

Commit

Permalink
Merge pull request #1995 from awerlang/patch-subscribe
Browse files Browse the repository at this point in the history
fix(Observer): fix Observable#subscribe() signature to suggest correct usage
  • Loading branch information
jayphelps authored Oct 3, 2016
2 parents e20cdb7 + 459d2a2 commit d7355c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Observable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ export class Observable<T> implements Subscribable<T> {
* @param {Function} complete (optional) a handler for a terminal event resulting from successful completion.
* @return {ISubscription} a subscription reference to the registered handlers
*/
subscribe(): Subscription;
subscribe(observer: PartialObserver<T>): Subscription;
subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Subscription;
subscribe(observerOrNext?: PartialObserver<T> | ((value: T) => void),
error?: (error: any) => void,
complete?: () => void): Subscription {
Expand Down

0 comments on commit d7355c7

Please sign in to comment.