Compare commits

..

2 Commits

Author SHA1 Message Date
satyajit.happy
d9e1a5ee25 chore: release 4.0.4 2019-09-12 16:15:20 +02:00
satyajit.happy
e3d2ce12c3 fix: improve type definitions 2019-09-12 16:14:48 +02:00
3 changed files with 7 additions and 6 deletions

View File

@@ -227,7 +227,7 @@ const StackWithTranslucentHeader = createStackNavigator(
},
},
{
defaultNavigationOptions: ({ theme }) => ({
defaultNavigationOptions: ({ theme }: { theme: SupportedThemes }) => ({
headerBackground:
Platform.OS === 'ios' ? (
<BlurView

View File

@@ -1,6 +1,6 @@
{
"name": "react-navigation",
"version": "4.0.3",
"version": "4.0.4",
"description": "Routing and navigation for your React Native apps",
"main": "src/react-navigation.js",
"types": "typescript/react-navigation.d.ts",

View File

@@ -200,7 +200,7 @@ declare module 'react-navigation' {
| Options
| ((
navigationOptionsContainer: NavigationScreenConfigProps<NavigationScreenPropType> & {
navigationOptions: NavigationScreenConfig<Options, NavigationScreenPropType>;
navigationOptions: Options;
}
) => Options);
@@ -439,6 +439,7 @@ declare module 'react-navigation' {
| { screen: NavigationComponent<Options, NavigationScreenPropType> }
| { getScreen(): NavigationScreenComponent<Options, NavigationScreenPropType> }) & {
navigationOptions?: NavigationScreenConfig<Options, NavigationScreenPropType>;
params?: { [key: string]: any }
path?: string;
};
@@ -745,9 +746,9 @@ declare module 'react-navigation' {
} & NavigationInjectedProps
>;
export type CreateNavigatorConfig<NavigatorConfig, RouterConfig, Options> = NavigatorConfig & RouterConfig & {
defaultNavigationOptions?: Options;
navigationOptions?: { [key: string]: any };
export type CreateNavigatorConfig<NavigatorConfig, RouterConfig, Options, NavigationScreenPropType> = NavigatorConfig & RouterConfig & {
defaultNavigationOptions?: NavigationScreenConfig<Options, NavigationScreenPropType>;
navigationOptions?: NavigationScreenConfig<{ [key: string]: any }, NavigationScreenProp<NavigationRoute>>;
}
export function createNavigator<S, Options>(