-
Notifications
You must be signed in to change notification settings - Fork 3k
Improve type inference of pluck
operator
#2881
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
Comments
Surprisingly, our 5 version is based on TS compiler doesn't support |
Sorry, I'm a bit confused by the tickets. #2295 and #2179 are both closed (thus I didn't find them when searching). Is there an open ticket that's tagged with I noticed #2759 which has fixes to the type of an operator ( |
I'm planning to reopen one of original issue after we stabilize 6 branch and create separate label. For now it's closed as not actionable. There's mixed issues between some are opened and some are not and it's simply we haven't gone through all issues. |
Is this ready to be reopened? |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
RxJS version:
5.4.3
Code to reproduce:
Expected behavior:
a
be of typeObservable<{b: 1}>
.Actual behavior:
a
is of typeObservable<{}>
Additional information:
While I realise that I can provide the type of the return value to
pluck
, doing so doesn't give me any type safety. Instead, this could be inferred, at least for an arbitrary level of nesting. Anyone who goes beyond this level of nesting wouldn't be able to use type inference, very similarly to the current state of things.The text was updated successfully, but these errors were encountered: