diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts
index 846ea56a9e..15e72b6b61 100644
--- a/types/react-navigation/index.d.ts
+++ b/types/react-navigation/index.d.ts
@@ -1248,17 +1248,17 @@ export interface NavigationInjectedProps
{
}
// If the wrapped component is a class, we can get a ref to it
-export function withNavigation>(
- Component: T,
-): React.ComponentType, keyof NavigationInjectedProps> & { onRef?: React.Ref> }>;
+export function withNavigation>(
+ Component: T & React.ComponentClass
,
+): React.ComponentType & { onRef?: React.Ref> }>;
-export function withNavigation>(
- Component: T,
-): React.ComponentType, keyof NavigationInjectedProps>>;
+export function withNavigation(
+ Component: React.ComponentType
,
+): React.ComponentType>;
// For backwards compatibility
export function withNavigation(
- Component: React.ComponentType)>,
+ Component: React.ComponentType>,
): React.ComponentType>> }>;
export interface NavigationFocusInjectedProps extends NavigationInjectedProps
{
@@ -1266,13 +1266,13 @@ export interface NavigationFocusInjectedProps
extends Navi
}
// If the wrapped component is a class, we can get a ref to it
-export function withNavigationFocus>(
- Component: T,
-): React.ComponentType, keyof NavigationFocusInjectedProps> & { onRef?: React.Ref> }>;
+export function withNavigationFocus>(
+ Component: T & React.ComponentClass
,
+): React.ComponentType & { onRef?: React.Ref> }>;
-export function withNavigationFocus>(
- Component: T,
-): React.ComponentType, keyof NavigationFocusInjectedProps>>;
+export function withNavigationFocus(
+ Component: React.ComponentType
,
+): React.ComponentType>;
// For backwards compatibility
export function withNavigationFocus(
diff --git a/types/react-navigation/react-navigation-tests.tsx b/types/react-navigation/react-navigation-tests.tsx
index e568fbed27..ba77442a40 100644
--- a/types/react-navigation/react-navigation-tests.tsx
+++ b/types/react-navigation/react-navigation-tests.tsx
@@ -383,14 +383,14 @@ class CustomTransitioner extends React.Component
/>
);
}
- _render = (props: NavigationTransitionProps, prevProps: NavigationTransitionProps): React.ReactElement => {
+ _render = (props: NavigationTransitionProps, prevProps?: NavigationTransitionProps): React.ReactElement => {
return (
);
}
_configureTransition = (
_transitionProps: NavigationTransitionProps,
- _prevTransitionProps: NavigationTransitionProps
+ _prevTransitionProps?: NavigationTransitionProps
) => {
return {};
}
diff --git a/types/react-navigation/tsconfig.json b/types/react-navigation/tsconfig.json
index b0cf7029db..bc49bee237 100644
--- a/types/react-navigation/tsconfig.json
+++ b/types/react-navigation/tsconfig.json
@@ -7,7 +7,7 @@
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
- "strictFunctionTypes": false,
+ "strictFunctionTypes": true,
"baseUrl": "../",
"jsx": "react",
"typeRoots": [