-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Spread object type inference error #51253
Comments
There's no reason to infer |
btw this is not destructuring assignment - itβs a spread. Destructuring is when you do let { x, y } = point; |
@fatcerberus Object spread only skips properties that haven't been defined, but it does not skip properties that have been defined to be But I'm certain there's an existing issue for this that I can't find right now. edit: Just noticed that you mentioned edit: This is a duplicate of #44432 |
@MartinJohns Yes, I was aware. Without exactOptionalPropertyTypes, optional properties can be set to |
Bug Report
π Search Terms
π Version & Regression Information
TS version: 4.8.4
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
π Expected behavior
The type of
b
should be:The text was updated successfully, but these errors were encountered: