Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove misused type parameter from isObservable #6083

Merged
merged 2 commits into from
Mar 8, 2021

Conversation

cartant
Copy link
Collaborator

@cartant cartant commented Mar 5, 2021

Description:

This PR removes a misused type parameter from isObservable. The type parameter T is misused because there's no way it can be inferred; it's nothing more than a type assertion. There is no way isObservable can know the element type of any value that it deems to be an Observable, so it should return Observable<unknown>. IMO, we should not be encouraging devs to write unsafe code.

BREAKING CHANGE: isObservable returns is Observable<unknown> and no longer accepts a type parameter.

Related issue (if exists): Nope

@cartant cartant requested a review from jayphelps March 5, 2021 12:49
@benlesh benlesh merged commit f16b634 into ReactiveX:master Mar 8, 2021
@cartant cartant deleted the cartant/is-observable branch March 19, 2021 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants