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

Better types for withStyles WIP - no merge yet - #12106

Closed
wants to merge 1 commit into from
Closed

Better types for withStyles WIP - no merge yet - #12106

wants to merge 1 commit into from

Conversation

Bnaya
Copy link

@Bnaya Bnaya commented Jul 10, 2018

@pelotom
Copy link
Member

pelotom commented Jul 11, 2018

This function has proven to be by far the trickiest thing to give an accurate type to in Material UI and has undergone many attempted overhauls in the past with varying degrees of success. Nothing has been completely satisfactory.

FYI we discovered in #11003 that using Omit in the return type of withStyles could not be made to work without precluding components whose props are unions.

If you can get it to pass all the current type tests that's a great sign, and I'd be happy to take a closer look at that point!

@pelotom
Copy link
Member

pelotom commented Jul 11, 2018

The withTheme part looks good at a glance!

@oliviertassinari oliviertassinari added typescript PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI labels Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants