-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Typescript Definition Updates in 4.9.0: potentially incorrect #19362
Comments
It wasn't clear in #19263 if people actually make use of it. We never got any feedback on this via types, tests or docs contributions. Seems like didn't cover all our docs with types. I will check out if we can safely widen the type. |
Right there with @ririvas. The fixed app bar solution using mixins doesn't even work anymore. |
That is now giving me this error:
|
@eps1lon, let me know if I can help in anyway |
You can try reverting the part of #19263 that changed the type of |
also experiencing this issue |
@seandearnaley What problem? Do you have reproduction? |
@oliviertassinari so when I updated my @material-ui/core version to 4.9.0 I started getting type definition errors on makeStyles(). I checked the release notes and docs and I can't see any breaking changes I should make. It appears to be the same aforementioned issue on this thread. Rolling back the version to ^4.8.3 gets rid of the error.
|
any updates on this? |
Hi, I've just been going through the changes made and the thread on improving type performance. Seems like I will go for a simple revert, but I wanted to make sure I understood the context If someone can address it quicker, please go ahead. |
Thanks @ririvas sorry about asking for updates, I'm actually in no rush I just thought it was something I may have did, or some doc I missed, thanks for working on it. |
We temporarily solved the issue by casting theme.mixins.toolbar to Material-UI's CSSProperties instead of React.CSSProperties: import {makeStyles} from '@material-ui/core/styles'
import {CSSProperties} from '@material-ui/styles'
const useStyles = makeStyles((theme: Theme) => ({
root: {
toolbar: theme.mixins.toolbar as CSSProperties,
}
})) |
Closed with #19491 |
|
Hello,
I recently pulled the latest @material-ui/core package, version 4.9.0 and my typescript compilation process began to fail. Specifically, my custom Theme override.
The media query definitions failed.
Perhaps we deprecated this functionality but the docs say otherwise. And the release notes don't comment on this change.
For this particular issue, I can track it to the change #19263 . And specifically, this file: d30e6bb#diff-353a3bd7b4e96490bd34f7442f3e08c6
Here is a codesandbox demo illustrating the type error.
The text was updated successfully, but these errors were encountered: