Skip to content

[code-infra] Allow more permissive Element types#48186

Open
JCQuintas wants to merge 2 commits intomui:masterfrom
JCQuintas:fix-jsx.element-gen
Open

[code-infra] Allow more permissive Element types#48186
JCQuintas wants to merge 2 commits intomui:masterfrom
JCQuintas:fix-jsx.element-gen

Conversation

@JCQuintas
Copy link
Copy Markdown
Member

There are some instances in X where the resolver uses the file location as the import name, which means we need to manually say that function returns a component.

// something like
const MyComponent = (): React.JSX.Element => <div />

In this PR I make the resolver more permissive by only checking that the final types have the correct name. We could try to be more strict, but I don't see any reason to do that tbh.

@JCQuintas JCQuintas self-assigned this Apr 2, 2026
@JCQuintas JCQuintas added type: bug It doesn't behave as expected. scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). labels Apr 2, 2026
@mui-bot
Copy link
Copy Markdown

mui-bot commented Apr 2, 2026

Netlify deploy preview

https://deploy-preview-48186--material-ui.netlify.app/

Bundle size report

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 68d1480

@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 21, 2026
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 30, 2026
@code-infra-dashboard
Copy link
Copy Markdown

Deploy preview

https://deploy-preview-48186--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@JCQuintas JCQuintas marked this pull request as ready for review April 30, 2026 13:07
@JCQuintas JCQuintas requested a review from a team April 30, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants