-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
[infra] Turn literal | (string & {}) to PropTypes.string
#46934
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
[infra] Turn literal | (string & {}) to PropTypes.string
#46934
Conversation
Netlify deploy previewhttps://deploy-preview-46934--material-ui.netlify.app/ Bundle size report
|
brijeshb42
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. How long did this bug last 😂
Too long 🤣, I can't stand with it anymore. |
…siriwatknp/material-ui into infra/ts-proptypes-literal-autocomplete
|
@brijeshb42 FYI, just pushed b07532a to fix the CI because those ignore are no longer needed anymore because the produced proptypes will always be string. |
|
Nice, been looking into this before as well but eventually abandoned it. Thanks for fixing this. |
From mui/mui-x#19529
Currently if the type is
'some' | 'value' | (string & {}), the generated prop-types containsobjectwhich is not correct:The correct code should be: