-
Notifications
You must be signed in to change notification settings - Fork 40
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
Bug: nearly identical props interface with the same name is added #2019
Comments
@all-contributors please add @pjonsson for bug.
|
I've put up a pull request to add @pjonsson! 🎉 |
Adds @pjonsson as a contributor for bug. This was requested by JoshuaKGoldberg [in this comment](#2019 (comment)) --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Similar thing can be seen in mutation test result here: https://github.com/JoshuaKGoldberg/TypeStat/pull/2053/files#diff-6319c84205dbc04fcb4e4500e85fdb381ba38ed92154df87de3a043702b361f0 It seems that the problem is mostly happening when creating component with a function. I suspect that the React area is written mostly old class components in mind. In that test we can see, that it's actually also adding the interface twice. |
I think at least one of these React problems probably comes |
🐛 Bug Report
Actual Behavior
Expected Behavior
The inferred interface is nearly identical to the one that already exists (missing
?
on the members), and even has the same name as the existing interface.Could there be some "equivalence" between the inferred
isChecked
and the declaredisChecked?
missing?This also shows another example of #2018: the previous type annotation is not replaced in the function signature.
Reproduction
Same as #2014.
The text was updated successfully, but these errors were encountered: