Skip to content

Commit 7ee9bc0

Browse files
Update minimal TypeScript version to 3.7.2 or higher (webdriverio#4740)
* update typescript to v3.7.3 * fix types * add circular reference for jsonArray
1 parent 7595729 commit 7ee9bc0

File tree

6 files changed

+6
-14
lines changed

6 files changed

+6
-14
lines changed

docs/TypeScript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: TypeScript Setup
55

66
Similar to Babel setup, you can register [TypeScript](http://www.typescriptlang.org) to compile your `*.ts` files in the `before` hook of your config file. You will need [`ts-node`](https://github.com/TypeStrong/ts-node) and [`tsconfig-paths`](https://github.com/dividab/tsconfig-paths) installed as `devDependencies`.
77

8-
The minimum TypeScript version is 3.5.1.
8+
The minimum TypeScript version is 3.7.3.
99

1010
```js
1111
// wdio.conf.js

packages/devtools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"node": ">=10.0.0"
1111
},
1212
"types": "./devtools.d.ts",
13-
"typeScriptVersion": "3.5.1",
13+
"typeScriptVersion": "3.7.3",
1414
"scripts": {
1515
"build": "run-s clean compile",
1616
"clean": "rimraf ./build",

packages/wdio-shared-store-service/shared-store-service.d.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
type jsonPrimitive = string | number | boolean | null;
22
type jsonObject = { [x: string]: jsonPrimitive | jsonObject | jsonArray };
3-
type jsonArray = Array<jsonPrimitive | jsonObject | jsonArrayWorkaround>;
3+
type jsonArray = Array<jsonPrimitive | jsonObject | jsonArray>;
44
type jsonCompatible = jsonPrimitive | jsonObject | jsonArray;
55

6-
/**
7-
* circular reference workaround until TypeScript 3.7
8-
* https://github.com/microsoft/TypeScript/pull/33050
9-
* `jsonArray` should repplace `jsonArrayWorkaround` in `jsonArray` array types
10-
* and interface below can be removed
11-
*/
12-
interface jsonArrayWorkaround extends Array<jsonPrimitive | jsonObject | jsonArray> { }
13-
146
declare namespace WebdriverIO {
157
interface BrowserObject {
168
sharedStore: {

packages/wdio-sync/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"test:unit": "jest"
1919
},
2020
"types": "./webdriverio.d.ts",
21-
"typeScriptVersion": "3.5.1",
21+
"typeScriptVersion": "3.7.3",
2222
"repository": {
2323
"type": "git",
2424
"url": "git://github.com/webdriverio/webdriverio.git"

packages/webdriver/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"node": ">=10.0.0"
1111
},
1212
"types": "./webdriver.d.ts",
13-
"typeScriptVersion": "3.5.1",
13+
"typeScriptVersion": "3.7.3",
1414
"scripts": {
1515
"build": "run-s clean compile",
1616
"clean": "rimraf ./build",

packages/webdriverio/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"testingbot"
4747
],
4848
"types": "./webdriverio.d.ts",
49-
"typeScriptVersion": "3.5.1",
49+
"typeScriptVersion": "3.7.3",
5050
"scripts": {
5151
"build": "run-s clean compile",
5252
"clean": "rimraf ./build",

0 commit comments

Comments
 (0)