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 AsyncPipe types for RxJS 6 and 7 #41590
Conversation
Adds a fix to make sure that RxJS v7 Observable is compatible with AsyncPipe. This is a typings-only change. For more information see: microsoft/TypeScript#43643
29665eb
to
679fb71
Compare
Sorry if it's a noobish request, but could one of you help bots to complete the checks? Please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL! We only just recently switched this from Observable to Subscribable!
I am not sure where this puts us in terms of breaking changes... it is possible that, since we made the change, someone has implemented this pipe with a Subscribable
object rather than an Observable
, which would no longer work. But I suspect this is very unlikely.
Approving generally. This should trigger a public-api review round.
Since this change only adds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I Observe that these changes look good.
reviewed-for: public-api
FYI, presubmit looks good, the changes were approved (and the changes look backwards-compatible), so I'm adding the "merge" label. Thank you. |
Adds a fix to make sure that RxJS v7 Observable is compatible with AsyncPipe. This is a typings-only change. For more information see: microsoft/TypeScript#43643 PR Close #41590
Adds a fix to make sure that RxJS v7 Observable is compatible with AsyncPipe. This is a typings-only change. For more information see: microsoft/TypeScript#43643 PR Close #41590
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Please check if your PR fulfills the following requirements:
Tests for the changes have been added (for bug fixes / features)this is a non-breaking change and adding a test would require adding a development dependency to this project ofrxjs@next
, which seems like overkill. However this will get exercised extremely well ingoogle3
.Docs have been added / updated (for bug fixes / features)unnecessaryPR Type
What kind of change does this PR introduce?
This resolves an issue reported to me by @leggechr and escalated to @alxhub. The issue is discussed here as well: microsoft/TypeScript#43643
What is the current behavior?
Currently, when upgrading to RxJS 7, in many cases Angular templates are unable to infer the proper value type from RxJS observables. This is because of the TypeScript issue/quirk pointed out above.
What is the new behavior?
The value types will be inferred properly in the Angular template.
Does this PR introduce a breaking change?
Other information
This is affecting targets within
google3
and I recommend you work with @leggechr and escalate this as a Googler issue.