-
-
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
withStyles in Typescript, Props classes non nullable? #8267
Comments
Just saw the beta11, but it doesn't fix my issue since "classes" is still not nullable |
Having the same issue, although just updating "classes" to be nullable in withStyles.d.ts locally seems to resolve the issue relatively cleanly. It seems like the only other workaround requires passing classes as a prop everywhere. Maybe an easy fix? |
Thanks for the PR @ssalbdivad ! I guess we can close here. |
Probably shouldn't close this until a PR that resolves it is actually merged... |
Expected Behavior
We are using withStyle() to overload our components and access classes at rendering. Note that I am unsure we were using it the way it was intended to be. Please check the code below for a quick example.
Current Behavior
Since beta10 and Pull Request #8178, ExampleComp signature throw an exception when overload by withStyle() as the props Classes cannot be nullable. Problem : this is forcing us to pass a dummy classes props when calling the component.
Is it normal that classes is not nullable?
Your Environment
Typescript / Visual Studio Code
The text was updated successfully, but these errors were encountered: