Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.

Commit d8155b0

Browse files
committed
fix: set proper type for screenProps in ScreenComponent
1 parent 4205303 commit d8155b0

5 files changed

Lines changed: 24 additions & 23 deletions

File tree

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@expo/vector-icons": "10.0.5",
13-
"react-navigation": "^4.0.4",
13+
"react-navigation": "^4.0.7",
1414
"expo": "^33.0.7",
1515
"expo-asset": "^5.0.1",
1616
"expo-constants": "~5.0.1",

example/yarn.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -917,10 +917,10 @@
917917
resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-2.0.10.tgz#d28a446352e75754b78509557988359133cdbcca"
918918
integrity sha512-NrIzyLe0eSbhgMnHl2QdSEhaA7yXh6p9jzMomfUa//hoTXE+xbObGDdiWWSQm2bnXnZJg8XCU3AB9qzvqcuLnA==
919919

920-
"@react-navigation/core@^3.5.0":
921-
version "3.5.0"
922-
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.5.0.tgz#73d1a12448e2bd71855e0080b95a7f51ede0cd9e"
923-
integrity sha512-NLm24lA51R8o8c+iFnwtN9elqRzm4OJ8f1qPBCUNIYW1sb8M5yCD53vRP0fRcPFpr/6Xzs2TJMsWnnebwFp0Rw==
920+
"@react-navigation/core@^3.5.1":
921+
version "3.5.1"
922+
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.5.1.tgz#7a2339fca3496979305fb3a8ab88c2ca8d8c214d"
923+
integrity sha512-q7NyhWVYOhVIWqL2GZKa6G78YarXaVTTtOlSDkvy4ZIggo40wZzamlnrJRvsaQX46gsgw45FAWb5SriHh8o7eA==
924924
dependencies:
925925
hoist-non-react-statics "^3.3.0"
926926
path-to-regexp "^1.7.0"
@@ -4786,12 +4786,12 @@ react-navigation-tabs@1.2.0-alpha.0:
47864786
prop-types "^15.6.1"
47874787
react-native-tab-view "^1.4.1"
47884788

4789-
react-navigation@^4.0.4:
4790-
version "4.0.4"
4791-
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.0.4.tgz#afa43c7183891d38708cf57f1d4394fed1d4c2ad"
4792-
integrity sha512-MZeVkYkFTKZobhrXMV3Hgeg0HHeokCrYsbxActVfO0n6zfzm0/La6EiC2mIHiwOymvb1ZygyFf90vryLUMEBNA==
4789+
react-navigation@^4.0.7:
4790+
version "4.0.7"
4791+
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.0.7.tgz#cc7ce334fef009242494d623e50e9cf79eb63ddd"
4792+
integrity sha512-0tTWanq870Hyr1VGHuj98+myRHNQnKgpRgjgzhAwVuLShyPIB9OnoLGIwIcqEdxgxGo+JMFmIGg8KCr7xapfgg==
47934793
dependencies:
4794-
"@react-navigation/core" "^3.5.0"
4794+
"@react-navigation/core" "^3.5.1"
47954795
"@react-navigation/native" "^3.6.2"
47964796

47974797
react-proxy@^1.1.7:

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,21 @@
5959
"prettier": "^1.17.0",
6060
"react": "16.8.3",
6161
"react-dom": "16.8.6",
62-
"react-navigation": "^4.0.4",
6362
"react-native": "~0.59.8",
6463
"react-native-gesture-handler": "^1.1.0",
6564
"react-native-screens": "^1.0.0-alpha.22",
65+
"react-navigation": "^4.0.7",
6666
"react-test-renderer": "~16.8.0",
6767
"release-it": "^12.3.6",
6868
"scheduler": "^0.14.0",
6969
"typescript": "^3.4.5"
7070
},
7171
"peerDependencies": {
7272
"react": "*",
73-
"react-navigation": "^4.0.4",
7473
"react-native": "*",
7574
"react-native-gesture-handler": "^1.0.0",
76-
"react-native-screens": "^1.0.0 || ^1.0.0-alpha"
75+
"react-native-screens": "^1.0.0 || ^1.0.0-alpha",
76+
"react-navigation": "^4.0.7"
7777
},
7878
"jest": {
7979
"preset": "react-native",

src/types.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ export type NavigationStackScreenComponent<
158158
> = React.ComponentType<NavigationStackScreenProps<Params, ScreenProps>> & {
159159
navigationOptions?: NavigationScreenConfig<
160160
NavigationStackOptions,
161-
NavigationStackProp<NavigationRoute, Params>
161+
NavigationStackProp<NavigationRoute, Params>,
162+
ScreenProps
162163
>;
163164
};
164165

yarn.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,10 +1079,10 @@
10791079
xcode "^2.0.0"
10801080
xmldoc "^0.4.0"
10811081

1082-
"@react-navigation/core@^3.5.0":
1083-
version "3.5.0"
1084-
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.5.0.tgz#73d1a12448e2bd71855e0080b95a7f51ede0cd9e"
1085-
integrity sha512-NLm24lA51R8o8c+iFnwtN9elqRzm4OJ8f1qPBCUNIYW1sb8M5yCD53vRP0fRcPFpr/6Xzs2TJMsWnnebwFp0Rw==
1082+
"@react-navigation/core@^3.5.1":
1083+
version "3.5.1"
1084+
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.5.1.tgz#7a2339fca3496979305fb3a8ab88c2ca8d8c214d"
1085+
integrity sha512-q7NyhWVYOhVIWqL2GZKa6G78YarXaVTTtOlSDkvy4ZIggo40wZzamlnrJRvsaQX46gsgw45FAWb5SriHh8o7eA==
10861086
dependencies:
10871087
hoist-non-react-statics "^3.3.0"
10881088
path-to-regexp "^1.7.0"
@@ -7351,12 +7351,12 @@ react-native@~0.59.8:
73517351
xmldoc "^0.4.0"
73527352
yargs "^9.0.0"
73537353

7354-
react-navigation@^4.0.4:
7355-
version "4.0.4"
7356-
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.0.4.tgz#afa43c7183891d38708cf57f1d4394fed1d4c2ad"
7357-
integrity sha512-MZeVkYkFTKZobhrXMV3Hgeg0HHeokCrYsbxActVfO0n6zfzm0/La6EiC2mIHiwOymvb1ZygyFf90vryLUMEBNA==
7354+
react-navigation@^4.0.7:
7355+
version "4.0.7"
7356+
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.0.7.tgz#cc7ce334fef009242494d623e50e9cf79eb63ddd"
7357+
integrity sha512-0tTWanq870Hyr1VGHuj98+myRHNQnKgpRgjgzhAwVuLShyPIB9OnoLGIwIcqEdxgxGo+JMFmIGg8KCr7xapfgg==
73587358
dependencies:
7359-
"@react-navigation/core" "^3.5.0"
7359+
"@react-navigation/core" "^3.5.1"
73607360
"@react-navigation/native" "^3.6.2"
73617361

73627362
react-proxy@^1.1.7:

0 commit comments

Comments
 (0)