From f63c97114c949e975473090d3e26f0d9c0066416 Mon Sep 17 00:00:00 2001 From: "satyajit.happy" Date: Sun, 22 Sep 2019 00:38:47 +0200 Subject: [PATCH] fix: set proper type for screenProps in ScreenComponent --- example/package.json | 2 +- example/yarn.lock | 8 ++++---- package.json | 4 ++-- src/types.tsx | 6 ++++-- yarn.lock | 8 ++++---- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/example/package.json b/example/package.json index 0f0b3c61a..8c4b8c7cc 100644 --- a/example/package.json +++ b/example/package.json @@ -18,7 +18,7 @@ "react-native-safe-area-view": "0.13.1", "react-native-screens": "1.0.0-alpha.22", "react-native-tab-view": "^2.10.0", - "react-navigation": "^4.0.5", + "react-navigation": "^4.0.7", "react-navigation-stack": "^1.7.3" }, "devDependencies": { diff --git a/example/yarn.lock b/example/yarn.lock index 4ad6bf72b..d6029af0a 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -4594,10 +4594,10 @@ react-navigation-stack@^1.7.3: dependencies: prop-types "^15.7.2" -react-navigation@^4.0.5: - version "4.0.6" - resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.0.6.tgz#6e0c4324c8eb314f31b510a43cbf7cea9410f246" - integrity sha512-DEhAcuiPI+I8pEgKStVrhDjZA5bc/1Nc+ByKWPn1pVWJCRHs+i+vJ6D2KWZCUtpzKCSm/yVPyUab4hOCg8L+Ww== +react-navigation@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.0.7.tgz#cc7ce334fef009242494d623e50e9cf79eb63ddd" + integrity sha512-0tTWanq870Hyr1VGHuj98+myRHNQnKgpRgjgzhAwVuLShyPIB9OnoLGIwIcqEdxgxGo+JMFmIGg8KCr7xapfgg== dependencies: "@react-navigation/core" "^3.5.1" "@react-navigation/native" "^3.6.2" diff --git a/package.json b/package.json index feb4e0bcd..254cd4de6 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "react-native": "~0.57.1", "react-native-gesture-handler": "^1.4.1", "react-native-reanimated": "^1.2.0", - "react-navigation": "^4.0.5", + "react-navigation": "^4.0.7", "react-test-renderer": "16.5.0", "release-it": "^10.3.1", "typescript": "^3.5.2" @@ -85,7 +85,7 @@ "react-native-gesture-handler": "^1.0.0", "react-native-reanimated": "^1.0.0-alpha", "react-native-screens": "^1.0.0 || ^1.0.0-alpha", - "react-navigation": "^4.0.5" + "react-navigation": "^4.0.7" }, "husky": { "hooks": { diff --git a/src/types.tsx b/src/types.tsx index 961d1b129..c029c422f 100644 --- a/src/types.tsx +++ b/src/types.tsx @@ -207,7 +207,8 @@ export type NavigationMaterialTabScreenComponent< > = React.ComponentType> & { navigationOptions?: NavigationScreenConfig< NavigationMaterialTabOptions, - NavigationTabProp + NavigationTabProp, + ScreenProps >; }; @@ -217,7 +218,8 @@ export type NavigationBottomTabScreenComponent< > = React.ComponentType> & { navigationOptions?: NavigationScreenConfig< NavigationBottomTabOptions, - NavigationTabProp + NavigationTabProp, + ScreenProps >; }; diff --git a/yarn.lock b/yarn.lock index 2b0d38427..5d6e536ad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7672,10 +7672,10 @@ react-native@~0.57.1: xmldoc "^0.4.0" yargs "^9.0.0" -react-navigation@^4.0.5: - version "4.0.6" - resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.0.6.tgz#6e0c4324c8eb314f31b510a43cbf7cea9410f246" - integrity sha512-DEhAcuiPI+I8pEgKStVrhDjZA5bc/1Nc+ByKWPn1pVWJCRHs+i+vJ6D2KWZCUtpzKCSm/yVPyUab4hOCg8L+Ww== +react-navigation@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.0.7.tgz#cc7ce334fef009242494d623e50e9cf79eb63ddd" + integrity sha512-0tTWanq870Hyr1VGHuj98+myRHNQnKgpRgjgzhAwVuLShyPIB9OnoLGIwIcqEdxgxGo+JMFmIGg8KCr7xapfgg== dependencies: "@react-navigation/core" "^3.5.1" "@react-navigation/native" "^3.6.2"