From 6aebeec90c7a5694a9e95a2027cd357e23c11809 Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Wed, 6 Nov 2019 21:01:18 +0100 Subject: [PATCH] chore: upgrade to typescript 3.7 --- package.json | 2 +- packages/bottom-tabs/package.json | 2 +- packages/compat/package.json | 2 +- packages/core/package.json | 2 +- packages/drawer/package.json | 2 +- packages/example/package.json | 2 +- packages/material-bottom-tabs/package.json | 2 +- packages/material-top-tabs/package.json | 2 +- packages/native-stack/package.json | 2 +- packages/native-stack/src/views/StackView.tsx | 12 ++++++++++-- packages/native/package.json | 2 +- packages/routers/package.json | 2 +- packages/stack/package.json | 2 +- packages/stack/src/views/Header/HeaderSegment.tsx | 5 ----- yarn.lock | 8 ++++---- 15 files changed, 26 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 0d5ee008..ad7e6848 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "jest": "^24.8.0", "lerna": "^3.16.4", "prettier": "^1.18.2", - "typescript": "^3.6.3" + "typescript": "^3.7.2" }, "resolutions": { "react": "~16.8.3", diff --git a/packages/bottom-tabs/package.json b/packages/bottom-tabs/package.json index 955c5627..eb8e5c65 100644 --- a/packages/bottom-tabs/package.json +++ b/packages/bottom-tabs/package.json @@ -43,7 +43,7 @@ "react": "~16.8.3", "react-native": "~0.59.10", "react-native-safe-area-context": "^0.3.6", - "typescript": "^3.6.3" + "typescript": "^3.7.2" }, "peerDependencies": { "@react-navigation/core": "^5.0.0-alpha.0", diff --git a/packages/compat/package.json b/packages/compat/package.json index 6443a424..159cf7c8 100644 --- a/packages/compat/package.json +++ b/packages/compat/package.json @@ -29,7 +29,7 @@ "devDependencies": { "@types/react": "^16.9.4", "react": "~16.8.3", - "typescript": "^3.6.3" + "typescript": "^3.7.2" }, "peerDependencies": { "@react-navigation/core": "^5.0.0-alpha.0", diff --git a/packages/core/package.json b/packages/core/package.json index 50afa378..a94f0615 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -43,7 +43,7 @@ "react": "~16.8.3", "react-native-testing-library": "^1.9.1", "react-test-renderer": "~16.8.3", - "typescript": "^3.6.3" + "typescript": "^3.7.2" }, "peerDependencies": { "react": "~16.8.3" diff --git a/packages/drawer/package.json b/packages/drawer/package.json index 5879809e..40455f3c 100644 --- a/packages/drawer/package.json +++ b/packages/drawer/package.json @@ -47,7 +47,7 @@ "react-native-reanimated": "^1.3.0", "react-native-safe-area-context": "^0.3.6", "react-native-screens": "^2.0.0-alpha.7", - "typescript": "^3.6.3" + "typescript": "^3.7.2" }, "peerDependencies": { "@react-navigation/core": "^5.0.0-alpha.0", diff --git a/packages/example/package.json b/packages/example/package.json index 2065a14a..336c8f17 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -47,6 +47,6 @@ "babel-preset-expo": "^7.0.0", "expo-cli": "^3.4.1", "jetifier": "^1.6.4", - "typescript": "^3.6.3" + "typescript": "^3.7.2" } } diff --git a/packages/material-bottom-tabs/package.json b/packages/material-bottom-tabs/package.json index 691d843a..165dbf20 100644 --- a/packages/material-bottom-tabs/package.json +++ b/packages/material-bottom-tabs/package.json @@ -46,7 +46,7 @@ "react-native": "~0.59.10", "react-native-paper": "^3.1.1", "react-native-vector-icons": "^6.6.0", - "typescript": "^3.6.3" + "typescript": "^3.7.2" }, "peerDependencies": { "@react-navigation/core": "^5.0.0-alpha.0", diff --git a/packages/material-top-tabs/package.json b/packages/material-top-tabs/package.json index 49b55bce..862df3c7 100644 --- a/packages/material-top-tabs/package.json +++ b/packages/material-top-tabs/package.json @@ -46,7 +46,7 @@ "react-native-gesture-handler": "^1.3.0", "react-native-reanimated": "^1.3.0", "react-native-tab-view": "^2.10.0", - "typescript": "^3.6.3" + "typescript": "^3.7.2" }, "peerDependencies": { "@react-navigation/core": "^5.0.0-alpha.0", diff --git a/packages/native-stack/package.json b/packages/native-stack/package.json index c19549ba..50c21d02 100644 --- a/packages/native-stack/package.json +++ b/packages/native-stack/package.json @@ -35,7 +35,7 @@ "@react-native-community/bob": "^0.7.0", "del-cli": "^2.0.0", "react-native-screens": "^2.0.0-alpha.7", - "typescript": "^3.5.3" + "typescript": "^3.7.2" }, "peerDependencies": { "@react-navigation/core": "^5.0.0-alpha.0", diff --git a/packages/native-stack/src/views/StackView.tsx b/packages/native-stack/src/views/StackView.tsx index a6c6a7ee..e027de9d 100644 --- a/packages/native-stack/src/views/StackView.tsx +++ b/packages/native-stack/src/views/StackView.tsx @@ -5,7 +5,8 @@ import { StackNavigationState, StackActions } from '@react-navigation/routers'; import { // @ts-ignore ScreenStack, - Screen, + Screen as ScreenComponent, + ScreenProps, // eslint-disable-next-line import/no-unresolved } from 'react-native-screens'; import HeaderConfig from './HeaderConfig'; @@ -14,6 +15,14 @@ import { NativeStackDescriptorMap, } from '../types'; +const Screen = (ScreenComponent as unknown) as React.ComponentType< + ScreenProps & { + stackPresentation?: 'push' | 'modal' | 'transparentModal'; + stackAnimation?: 'default' | 'fade' | 'none'; + onDismissed?: () => void; + } +>; + type Props = { state: StackNavigationState; navigation: NativeStackNavigationHelpers; @@ -28,7 +37,6 @@ export default function StackView({ state, navigation, descriptors }: Props) { const { presentation = 'push', animation, contentStyle } = options; return ( - // @ts-ignore = { - route: T; - progress: Animated.Node; -}; - type Props = StackHeaderOptions & { headerTitle: (props: StackHeaderTitleProps) => React.ReactNode; layout: Layout; diff --git a/yarn.lock b/yarn.lock index f2b26d00..4f1ef54d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15424,10 +15424,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^3.5.3, typescript@^3.6.3: - version "3.6.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.3.tgz#fea942fabb20f7e1ca7164ff626f1a9f3f70b4da" - integrity sha512-N7bceJL1CtRQ2RiG0AQME13ksR7DiuQh/QehubYcghzv20tnh+MQnQIuJddTmsbqYj+dztchykemz0zFzlvdQw== +typescript@^3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.2.tgz#27e489b95fa5909445e9fef5ee48d81697ad18fb" + integrity sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ== ua-parser-js@^0.7.18, ua-parser-js@^0.7.19: version "0.7.20"