diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index d5f9801b5d..1233ca39e3 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -20,7 +20,7 @@ // TypeScript Version: 2.6 /** - * Reference: https://github.com/react-navigation/react-navigation/tree/a37473c5e4833f48796ee6c7c9cb4a8ac49d9c06 + * Reference: https://github.com/react-navigation/react-navigation/tree/3f3ef6485c8932f49fddc3dd2c508629110bf2b6 * * NOTE: Please update the commit/link above when updating to a new Flow * react-navigation/flow/react-navigation.js reference, so we can conveniently just look at diffs on @@ -313,6 +313,7 @@ export interface NavigationStackRouterConfig { initialRouteParams?: NavigationParams; paths?: NavigationPathsConfig; navigationOptions?: NavigationScreenConfig; + initialRouteKey?: string; } export type NavigationStackAction = diff --git a/types/react-navigation/react-navigation-tests.tsx b/types/react-navigation/react-navigation-tests.tsx index 6b8b5c99e8..b00b0a27fc 100644 --- a/types/react-navigation/react-navigation-tests.tsx +++ b/types/react-navigation/react-navigation-tests.tsx @@ -50,6 +50,7 @@ const viewStyle: ViewStyle = { }; const ROUTE_NAME_START_SCREEN = "StartScreen"; +const ROUTE_KEY_START_SCREEN = "StartScreen-key"; interface StartScreenNavigationParams { id: number; @@ -131,6 +132,7 @@ export const AppNavigator = StackNavigator( routeConfigMap, { initialRouteName: ROUTE_NAME_START_SCREEN, + initialRouteKey: ROUTE_KEY_START_SCREEN, initialRouteParams, navigationOptions, },