I am using support for defaultprops in jsx like described in https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#support-for-defaultprops-in-jsx
Everything works fine except in case when I extend props with another interface. In this case I extend my props inside child component like
interface Props extends WithNamespaces {
className: string;
}
and declare default props:
const defaultProps = {
className: ''
};
*WithNamespaces is an interface from react-i18next
In my parent component I get compile error that property className is missing for child component even though it should be optional, right?
Is there something that should be done differently to keep these default props not mandatory?