Skip to content

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

Draft
JCQuintas wants to merge 1 commit intomui:masterfrom
JCQuintas:fix-jsx.element-gen
Draft

[code-infra] Allow more permissive Element types#48186
JCQuintas wants to merge 1 commit 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

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