diff --git a/types/react-navigation/react-navigation-tests.tsx b/types/react-navigation/react-navigation-tests.tsx index 38aa495240..5bdc0f400c 100644 --- a/types/react-navigation/react-navigation-tests.tsx +++ b/types/react-navigation/react-navigation-tests.tsx @@ -41,6 +41,7 @@ import { NavigationScreenComponent, NavigationContainerComponent, withNavigation, + withNavigationFocus, NavigationInjectedProps, } from 'react-navigation'; @@ -532,3 +533,19 @@ const BackButtonWithNavigation = withNavigation(MyBackButton); const BackButtonInstance = { const backButtonRef = ref; }} />; + +// Test withNavigationFocus + +interface MyFocusedComponentProps { expectsFocus: boolean; } +class MyFocusedComponent extends React.Component { + render() { + return