-
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
Excess object literals property checking fails when the literal includes a spread #13878
Comments
Probably |
Previously, object literals with spreads in them would not issue object literal freshness errors. Fixes #13878
We discussed this in #12997, and decided it worked as intended. what changed? |
I just forgot when we noticed it again on Friday afternoon. On the surface it looks like an oversight. |
let x = { b: 1, extra: 2 }
let xx: { a, b } = { a: 1, ...x, z: 3 } // error for 'z', no error for 'extra' I see currenlty no error in 2.3 (march) for z was that fixed? And I also don't get why there should not be an error for |
@whitecolor See the last section #12997 for discussion. |
So it will be fixed, but in 2.4? |
yes. |
Excess object literal property checking fails when the literal includes a spread.
Actual: No Error
Expected:
Error for 'z', no error for 'extra'
The text was updated successfully, but these errors were encountered: