Skip to content

Commit 1a9fd42

Browse files
cartantbenlesh
authored andcommitted
fix(typings): fix subscribe overloads (#3053)
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
1 parent 7d722d4 commit 1a9fd42

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Observable.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ export class Observable<T> implements Subscribable<T> {
7373
return observable;
7474
}
7575

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

0 commit comments

Comments
 (0)