-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
Wrong typings for makeStyles #13718
Comments
Could you please add the snipped of your usage? Just to verify the |
Sure, makeStyles(styles); // works
makeStyles(styles, {}); // doesn't work It should accept 2nd argument (https://github.com/mui-org/material-ui/blob/next/packages/material-ui-styles/src/makeStyles.js#L14) but it doesn't (https://github.com/mui-org/material-ui/blob/next/packages/material-ui-styles/src/index.d.ts#L113) |
Oh come on. I meant your actual usage which I could add to the test. You're obviously not just adding an empty object. |
This is NOT about the shape of makeStyles(styles, {name: 'test'}); |
I just wanted to make sure that everything is covered. I didn't intend to make this sound like I'm somehow not believing you that this is an actualyl issue. Just wanted to make sure to make this right. I'm sure you wouldn't have been satisfied if I just added |
It would be great to have |
Closes #13718 * [styles] Add options definitions for makeStyles * [styles] Improve makeStyles typings test coverage
Expected Behavior
It should compile without errors
Current Behavior
I'm getting
Type error: Expected 1 arguments, but got 2. TS2554
when usingmakeStyles
with 2nd argumentThe text was updated successfully, but these errors were encountered: