Skip to content
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

JSX4: Fix missing attributes from props type #5971

Merged
merged 3 commits into from
Feb 4, 2023

Conversation

mununki
Copy link
Member

@mununki mununki commented Feb 4, 2023

This PR fixes #5969
This change keeps the attributes of the argument in the make function and removes the unnecessary optional attr from the core_type as the type parameter. So it prevents that uncurried functions were incorrectly converting the type of a prop given as a default value. The test has no diff with this PR, because the current master branch doesn't have an issue with it due to works regarding the uncurried as default

@cristianoc
Copy link
Collaborator

Somewhere there was the comment that this issue does not affect master.
So now I'm a bit surprised to see this PR for master. What that comment incorrect?

@cristianoc
Copy link
Collaborator

cristianoc commented Feb 4, 2023

I know master accepts an uncurried make. Is that why there was no problem in master?
Though the example in the issue is about the type of props, not the type of make.

@mununki
Copy link
Member Author

mununki commented Feb 4, 2023

I know master accepts an uncurried make. Is that why there was no problem in master? Though the example in the issue is about the type of props, not the type of make.

At first, I was surprised that there was no problem in master. By the way, this issue is about the uncurried function as a default value to the argument of make function. Not sure but I guess there was a change to parse and treat the uncurried function as a new type instead of attribute. I supposed that it would make the master doesn't have this issue.

@cristianoc
Copy link
Collaborator

In any case, this brings the code to be consistent with v10, so looks good.

@mununki mununki merged commit 31280da into master Feb 4, 2023
@mununki mununki deleted the fix-missing-attrs-props-type branch February 4, 2023 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10.1.2 JSXv4 Regression uncurried prop type is parsed as curried
2 participants