mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 17:20:09 +00:00
fixed error in react-navigation preventing declaring navigationOptions as a function (#23879)
This commit is contained in:
1
types/react-navigation/index.d.ts
vendored
1
types/react-navigation/index.d.ts
vendored
@@ -13,6 +13,7 @@
|
||||
// Sergei Butko: <https://github.com/svbutko>
|
||||
// Veit Lehmann: <https://github.com/levito>
|
||||
// Roberto Huertas: <https://github.com/robertohuertasm>
|
||||
// Steven Miller <https://github.com/YourGamesBeOver>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
|
||||
|
||||
@@ -199,6 +199,26 @@ function renderBasicStackNavigator(): JSX.Element {
|
||||
);
|
||||
}
|
||||
|
||||
const stackNavigatorConfigWithNavigationOptionsAsFunction: StackNavigatorConfig = {
|
||||
mode: "card",
|
||||
headerMode: "screen",
|
||||
navigationOptions: ({navigationOptions, navigation, screenProps}) => (stackNavigatorScreenOptions),
|
||||
};
|
||||
|
||||
const AdvancedStackNavigator = StackNavigator(
|
||||
routeConfigMap,
|
||||
stackNavigatorConfigWithNavigationOptionsAsFunction
|
||||
);
|
||||
|
||||
function renderAdvancedStackNavigator(): JSX.Element {
|
||||
return (
|
||||
<AdvancedStackNavigator
|
||||
ref={(ref: any) => { }}
|
||||
style={viewStyle}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Drawer navigator.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user