-
Notifications
You must be signed in to change notification settings - Fork 12.8k
support type inference of object non-literal keys #42158
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
Conversation
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.
The existing computed property case needs to be fixed.
tests/baselines/reference/contextualTypeInObectProperty.errors.txt
Outdated
Show resolved
Hide resolved
It looks like you've sent a pull request to update our 'lib' files. These files aren't meant to be edited by hand, as they consist of last-known good states of the compiler and are generated from 'src'. Unless this is necessary, consider closing the pull request and sending a separate PR to update 'src'. |
940d2b3
to
04abc00
Compare
422bfc4
to
c25d033
Compare
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.
@sandersn I still think a more complete fix like #46464 and #21070 is warranted for this and related issues. Our current behavior on computed names in object literals as a whole is very much from a time before literal types existed :(
Given how those have fared, I'm disinclined to take this as-is - I really wanna see us fix object literal computed names as a whole, rather than slowly adopt a patchwork of changes; and I'm really not buying the churn argument as a great reason to not adopt some of your older proposed changes so long as issues like these keep getting filed.
All right, I'll close this for now. |
Fixes #29718, Fixes #47737