-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
CardMediaTypeMap interface not exported #15923
Comments
What do you need it for? |
I have wrapped the CardMedia component. In the history i have use the version 3.9.3 and with this version it work's but not for the new version 4.0.1. Example comp:
I got the following typescript error.
|
I am getting this in 4.3.2 when using import CardMedia, { CardMediaProps } from '@material-ui/core/CardMedia';
import React, { ComponentType, PureComponent } from 'react';
interface SomeComponentProps {
CardMediaComponent: ComponentType<CardMediaProps>;
}
export class SomeComponent extends PureComponent<SomeComponentProps> {
public static defaultProps = {
CardMediaComponent: CardMedia,
};
public render() {
const { CardMediaComponent, ...props } = this.props;
return <CardMediaComponent {...props } />;
}
} The error is :
|
Workaround is not to declare it as a |
The type is exported since #17354. |
I've opened a request to fix issues like these in TypeScript by bringing declaration files to parity with language features. microsoft/TypeScript#35822 |
In the Material-UI version v4.0.1 is the CardMediaTypeMap interface not exported.
The text was updated successfully, but these errors were encountered: