mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 06:10:06 +00:00
add missing initalRouteKey property on NavigationStackRouterConfig (#25590)
This commit is contained in:
committed by
Sheetal Nandi
parent
a62e6431c7
commit
a62969017a
3
types/react-navigation/index.d.ts
vendored
3
types/react-navigation/index.d.ts
vendored
@@ -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<NavigationScreenOptions>;
|
||||
initialRouteKey?: string;
|
||||
}
|
||||
|
||||
export type NavigationStackAction =
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user