-
Notifications
You must be signed in to change notification settings - Fork 833
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
Change the typings of Clock to use a static type as ClassKey #1466
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1466 +/- ##
=========================================
+ Coverage 93.62% 93.7% +0.07%
=========================================
Files 55 55
Lines 1350 1350
Branches 199 199
=========================================
+ Hits 1264 1265 +1
+ Misses 68 67 -1
Partials 18 18
Continue to review full report at Codecov.
|
93ef972
to
2bf1039
Compare
That’s weird. We neeed to fix a problem but not a symptom. Why it was broken? There is no more way to infer style types? |
See the linked issue, changes were made in @material-ui/styles@4.9.0 |
This is blocking upgrade to material-ui 4.9.0 so I'm just suggesting this small fix to make them work together. |
Let’s wait a bit, I will investigate this issue when be at office. 1-2 hours |
An alternative may be to change it to |
It shouldn't unless your types were unsound to begin with. We had one union member that wasn't used in our test suite though. So this might help finding a test that makes use of that particular member. I'll probably won't have time looking into this particular issue this week. Though I am working on the picker types currently so this might include a useful side-effect. |
Yeah let's fix it for now with working overload. Thanks. |
My suggested alternative doesn't work after all, the reason it works on export const styles = (theme: Theme) => ({
transitionContainer: {
... while on export const styles = (theme: Theme) =>
createStyles({
container: {
... I'm not sure if there are any other consequences from removing |
Removing createStyles results in all sorts of other build issues. |
…s some compatibility issues with material-ui 4.9.0It should also be backwards compatibleFixes mui#1465
2bf1039
to
523e3ff
Compare
I've updated the approach to infer the ClassKey using keyof, this should at least be a middle ground you can tolerate? |
So yeah we're encountering this as well. Something else is going on though. It seems like it's using an outdated signature of Edit: Pretty sure this is only an issue because typescript inlined the type. It expanded We just need to bump the used version of core in this repository and republish. I would consider this a bug in typescript though. |
I fixed the root of this issue and released v2.3.10, so this can be closed. |
This PR closes #1465
Description
This fixes some compatibility issues with material-ui 4.9.0
It should also be backwards compatible
The changes todocs/prop-types.json
was done automatically by some sort of tooling when i committed... Not sure if the tooling isn't compatible with windows or something.I managed to circumvent the tooling that generates and adds
prop-types.json
to the commit.