-
-
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
[GlobalStyles] styles
type is probably too wide
#25208
Comments
I've took a look on this. The typings comes from emotion's |
Are we even sure that is the correct type in this place? Where is this type used in emotion and are we using it the same way? If these are equal then I'm referring back to "It's unclear what this is supposed to do.". Which may be an upstream issue. |
It looks like an upstream issue, we could report it back. From a type perspective, would this improve them? It won't fix the issue but maybe make them more accurate, not sure diff --git a/packages/material-ui-styled-engine/src/GlobalStyles/GlobalStyles.d.ts b/packages/material-ui-styled-engine/src/GlobalStyles/GlobalStyles.d.ts
index 70fc40831a..4458bd817c 100644
--- a/packages/material-ui-styled-engine/src/GlobalStyles/GlobalStyles.d.ts
+++ b/packages/material-ui-styled-engine/src/GlobalStyles/GlobalStyles.d.ts
@@ -1,9 +1,9 @@
import * as React from 'react';
-import { Interpolation } from '@emotion/styled';
+import { GlobalProps } from '@emotion/react';
export interface GlobalStylesProps {
defaultTheme?: object;
- styles: Interpolation<any>;
+ styles: GlobalProps['styles'];
}
export default function GlobalStyles(props: GlobalStylesProps): React.ReactElement; |
I don't think we will spend time on this. At least, I haven't seen issue related to this from the community before. |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. |
Follow-up to #25191
Current Behavior 😯
<GlobalStyles styles={false} />
is acceptedExpected Behavior 🤔
It's unclear what this is supposed to do. https://next--material-ui.netlify.app/customization/how-to-customize/#5-global-css-override only documents an object.
The documented type in the API is probably too wide. Either we restrict it or we add tests for each overload.
The text was updated successfully, but these errors were encountered: