-
Notifications
You must be signed in to change notification settings - Fork 13k
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
.
brieb, chibicode, azizhk, dan-kez, Hotell and 16 more
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScript