-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Support __proto__ in object literal (type-check only) #48816
Conversation
The TypeScript team hasn't accepted the linked issue #13933. If you can get it accepted, this PR will have a better chance of being reviewed. |
To be honest, I don't think we want the complexity of ever thinking about |
#39882 has another 11, from a mostly different set of people. Anyway, while I think it's fair to not want to think about prototypes, it seems a shame to say that |
It's standard ECMAScript syntax, so even if we don't bring in the whole prototypical semantics, it should at least be special-cased to not mess with valid things like |
This PR doesn't bring "prototype" into the type system. It will treat |
@bakkot @Josh-Cena @Jack-Works can you make your case on an issue instead of on a PR? Changes to checker.ts, especially, bit-rot quickly and technical concerns get confused with semantics. |
To help with PR housekeeping, I'm going to close this PR while it's still waiting on its bug to be accepted. We can open again once that happens. |
related #38385
close #13933
Related:
https://tc39.es/ecma262/#sec-__proto__-property-names-in-object-initializers
tc39/ecma262#2125
Re-open of PR #42359