Closed
Description
TypeScript Version: 3.2.0-dev.20180927
Search Terms:
Code
interface Props {
text: string;
}
function BackButton(props: Props) {
return <div/>
}
BackButton.defaultProps = {
text: 'Go Back',
};
let a = <BackButton /> // error: text is missing in type {}
It works ok with React.Component
. Also I tried to make LibraryManagedAttributes<C,P>={c: string}
. This changed checking for Component
, but not for SFC
.