Skip to content

Commit

Permalink
chore: upgrade to typescript 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Nov 6, 2019
1 parent 75ed888 commit 6aebeec
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 23 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/bottom-tabs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/drawer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion packages/material-bottom-tabs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/material-top-tabs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/native-stack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 10 additions & 2 deletions packages/native-stack/src/views/StackView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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;
Expand All @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion packages/native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/routers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/stack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 0 additions & 5 deletions packages/stack/src/views/Header/HeaderSegment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 6aebeec

Please sign in to comment.