-
Notifications
You must be signed in to change notification settings - Fork 12.8k
JSX Spread Type Safety #16725
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
Labels
Duplicate
An existing issue was already created
Comments
but what about codes that actually make use of that property? const someProps = Object.assign({}, defaultProps, data1, data2);
...
<Test {...someProps} /> ? |
It's in release 2.4 @ccorcos can you try |
I'll try it out and get back you -- thanks for the help! |
I saw this working in 2.4 for JSX this weekend. |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
TypeScript Version: 2.2.2, 2.3.4
Code
Expected behavior:
I would expect extra props passed in an object spread to throw a type error. Otherwise I don't know if I'm passing props that are lost in translation.
Actual behavior:
I don't get a type error.
The text was updated successfully, but these errors were encountered: