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

[system] Show type error for invalid properties in sx prop #33879

Conversation

ZeeshanTamboli
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli commented Aug 10, 2022

Fixes #33794

Detailed explanation in #33794 (comment).

I believe this is not a robust solution. I opened this PR to discuss if there's a better solution.


Before: https://codesandbox.io/s/jovial-glitter-kt9uvc?file=/demo.tsx

After: https://codesandbox.io/s/agitated-brattain-3dv74i?file=/demo.tsx

Works for me with TypeScript version 3.5.3

@ZeeshanTamboli ZeeshanTamboli added bug 🐛 Something doesn't work typescript package: system Specific to @mui/system labels Aug 10, 2022
@mui-bot
Copy link

mui-bot commented Aug 10, 2022

No bundle size changes

Generated by 🚫 dangerJS against 7cd6be5

@ZeeshanTamboli ZeeshanTamboli marked this pull request as ready for review August 10, 2022 09:08
@mnajdova
Copy link
Member

Overall I would be leaning toward making the types less complicated instead, as this type is currently one of the bottlenecks we have in #19113. Not saying the fix is not good, just that it may hurt perf even more. I would rather first spend some time trying to simplify it.

@ZeeshanTamboli
Copy link
Member Author

Closing this as we want to simplify the types first as suggested above.

@ZeeshanTamboli ZeeshanTamboli deleted the issue/33794-fix-invalid-properties-sx-prop branch November 3, 2022 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work package: system Specific to @mui/system typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid strings are available for sx property names
3 participants