mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-01-12 22:51:18 +08:00
chore: upgrade to typescript 3.7
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
<Screen
|
||||
key={route.key}
|
||||
style={StyleSheet.absoluteFill}
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"del-cli": "^3.0.0",
|
||||
"react": "~16.8.3",
|
||||
"react-native": "~0.59.10",
|
||||
"typescript": "^3.6.3"
|
||||
"typescript": "^3.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-navigation/core": "^5.0.0-alpha.0",
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
"devDependencies": {
|
||||
"@react-native-community/bob": "^0.7.0",
|
||||
"del-cli": "^3.0.0",
|
||||
"typescript": "^3.6.3"
|
||||
"typescript": "^3.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-navigation/core": "^5.0.0-alpha.0"
|
||||
|
||||
@@ -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-native-community/masked-view": "^0.1.1",
|
||||
|
||||
@@ -21,11 +21,6 @@ import {
|
||||
Scene,
|
||||
} from '../../types';
|
||||
|
||||
export type Scene<T> = {
|
||||
route: T;
|
||||
progress: Animated.Node<number>;
|
||||
};
|
||||
|
||||
type Props = StackHeaderOptions & {
|
||||
headerTitle: (props: StackHeaderTitleProps) => React.ReactNode;
|
||||
layout: Layout;
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user