Skip to content
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

[core] Try alternative to OverrideComponent type (ver 2) #33964

Closed

Conversation

mnajdova
Copy link
Member

@mnajdova mnajdova commented Aug 17, 2022

@@ -7,7 +7,7 @@ interface MyOverrideProps {
myString?: string;
myCallback?(n: number): void;
}
declare const MyOverrideComponent: React.ComponentType<MyOverrideProps>;
declare const MyOverrideComponent: React.FunctionComponent<MyOverrideProps>;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be double checked, for some reason I needed to change the type from ComponentType to FunctionComponent.

@mui-bot
Copy link

mui-bot commented Aug 17, 2022

No bundle size changes

Generated by 🚫 dangerJS against 7f3dc26

@@ -106,10 +106,12 @@ const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(function Link(props,
const nextjsProps = { to: href, linkAs, replace, scroll, shallow, prefetch, locale };

if (noLinkStyle) {
// @ts-ignore TODO: this needs to be resolved
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's interesting that in both implementations these ts-ignores are required.

@mnajdova
Copy link
Member Author

I am closing it turned out to be a dead end

@mnajdova mnajdova closed this Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants