chore: upgrade to typescript 4.1

This commit is contained in:
Satyajit Sahoo
2020-12-03 01:56:28 +01:00
parent 12b893d7ca
commit 65d8b487f8
16 changed files with 25 additions and 25 deletions

View File

@@ -58,6 +58,6 @@
"nodemon": "^2.0.6",
"playwright": "^0.14.0",
"serve": "^11.3.0",
"typescript": "^4.0.3"
"typescript": "^4.1.2"
}
}

View File

@@ -38,7 +38,7 @@
"lerna": "^3.22.1",
"metro-react-native-babel-preset": "^0.63.0",
"prettier": "^2.1.2",
"typescript": "^4.0.3"
"typescript": "^4.1.2"
},
"resolutions": {
"react": "~16.13.1",

View File

@@ -51,7 +51,7 @@
"react-native": "~0.63.2",
"react-native-safe-area-context": "3.1.4",
"react-native-screens": "~2.10.1",
"typescript": "^4.0.3"
"typescript": "^4.1.2"
},
"peerDependencies": {
"@react-navigation/native": "^5.0.5",

View File

@@ -50,7 +50,7 @@
"del-cli": "^3.0.1",
"react": "~16.13.1",
"react-test-renderer": "~16.13.1",
"typescript": "^4.0.3"
"typescript": "^4.1.2"
},
"peerDependencies": {
"react": "*"

View File

@@ -168,8 +168,8 @@ type NavigationHelpersCommon<
*/
navigate<RouteName extends keyof ParamList>(
...args: undefined extends ParamList[RouteName]
? [RouteName] | [RouteName, ParamList[RouteName]]
: [RouteName, ParamList[RouteName]]
? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]]
: [screen: RouteName, params: ParamList[RouteName]]
): void;
/**
@@ -178,7 +178,7 @@ type NavigationHelpersCommon<
* @param route Object with `key` or `name` for the route to navigate to, and a `params` object.
*/
navigate<RouteName extends keyof ParamList>(
route:
options:
| { key: string; params?: ParamList[RouteName] }
| { name: RouteName; key?: string; params: ParamList[RouteName] }
): void;

View File

@@ -47,7 +47,7 @@
"@types/react": "^16.9.53",
"del-cli": "^3.0.1",
"react": "~16.13.1",
"typescript": "^4.0.3"
"typescript": "^4.1.2"
},
"peerDependencies": {
"react": "*"

View File

@@ -57,7 +57,7 @@
"react-native-reanimated": "~1.13.0",
"react-native-safe-area-context": "3.1.4",
"react-native-screens": "~2.10.1",
"typescript": "^4.0.3"
"typescript": "^4.1.2"
},
"peerDependencies": {
"@react-navigation/native": "^5.0.5",

View File

@@ -53,7 +53,7 @@
"react-native": "~0.63.2",
"react-native-paper": "^4.2.0",
"react-native-vector-icons": "^7.0.0",
"typescript": "^4.0.3"
"typescript": "^4.1.2"
},
"peerDependencies": {
"@react-navigation/native": "^5.0.5",

View File

@@ -56,7 +56,7 @@
"react-native-gesture-handler": "~1.7.0",
"react-native-reanimated": "~1.13.0",
"react-native-tab-view": "^2.15.2",
"typescript": "^4.0.3"
"typescript": "^4.1.2"
},
"peerDependencies": {
"@react-navigation/native": "^5.0.5",

View File

@@ -52,7 +52,7 @@
"react": "~16.13.1",
"react-dom": "^16.13.1",
"react-native": "~0.63.2",
"typescript": "^4.0.3"
"typescript": "^4.1.2"
},
"peerDependencies": {
"react": "*",

View File

@@ -134,7 +134,7 @@ const createMemoryHistory = () => {
// - There's history to go back, `history.go` is called, and `popstate` fires
// - `history.go` is called multiple times, we need to resolve on respective `popstate`
// - No history to go back, but `history.go` was called, browser has no API to detect it
return new Promise((resolve, reject) => {
return new Promise<void>((resolve, reject) => {
const done = (interrupted?: boolean) => {
clearTimeout(timer);

View File

@@ -42,7 +42,7 @@
"devDependencies": {
"@react-native-community/bob": "^0.16.2",
"del-cli": "^3.0.1",
"typescript": "^4.0.3"
"typescript": "^4.1.2"
},
"@react-native-community/bob": {
"source": "src",

View File

@@ -54,8 +54,8 @@ export type StackActionHelpers<ParamList extends ParamListBase> = {
*/
replace<RouteName extends keyof ParamList>(
...args: undefined extends ParamList[RouteName]
? [RouteName] | [RouteName, ParamList[RouteName]]
: [RouteName, ParamList[RouteName]]
? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]]
: [screen: RouteName, params: ParamList[RouteName]]
): void;
/**
@@ -66,8 +66,8 @@ export type StackActionHelpers<ParamList extends ParamListBase> = {
*/
push<RouteName extends keyof ParamList>(
...args: undefined extends ParamList[RouteName]
? [RouteName] | [RouteName, ParamList[RouteName]]
: [RouteName, ParamList[RouteName]]
? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]]
: [screen: RouteName, params: ParamList[RouteName]]
): void;
/**

View File

@@ -51,8 +51,8 @@ export type TabActionHelpers<ParamList extends ParamListBase> = {
*/
jumpTo<RouteName extends Extract<keyof ParamList, string>>(
...args: undefined extends ParamList[RouteName]
? [RouteName] | [RouteName, ParamList[RouteName]]
: [RouteName, ParamList[RouteName]]
? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]]
: [screen: RouteName, params: ParamList[RouteName]]
): void;
};

View File

@@ -58,7 +58,7 @@
"react-native-gesture-handler": "~1.7.0",
"react-native-safe-area-context": "3.1.4",
"react-native-screens": "~2.10.1",
"typescript": "^4.0.3"
"typescript": "^4.1.2"
},
"peerDependencies": {
"@react-navigation/native": "^5.0.5",

View File

@@ -18396,10 +18396,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
typescript@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5"
integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==
typescript@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9"
integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==
ua-parser-js@^0.7.18:
version "0.7.22"