diff --git a/types/react-router/test/WithRouterDecorator.tsx b/types/react-router/test/WithRouterDecorator.tsx index 6d87de2e6b..2eb6bd2335 100644 --- a/types/react-router/test/WithRouterDecorator.tsx +++ b/types/react-router/test/WithRouterDecorator.tsx @@ -5,6 +5,7 @@ interface TOwnProps { username: string; } +// $ExpectType Component @withRouter class Component extends React.Component { render() { @@ -16,4 +17,7 @@ class Component extends React.Component { const WithRouterTest = () => (); +// $ExpectType Element +WithRouterTest(); + export default WithRouterTest;