Skip to content

Commit f88c054

Browse files
Merge pull request #32 from testing-library/fix-typescript-compilation-when-checking-libs
fix: typescript compilation when checking libs
2 parents e907070 + 65d1d60 commit f88c054

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@
3838
"@types/simmerjs": "^0.5.1",
3939
"@typescript-eslint/eslint-plugin": "^4.14.0",
4040
"@typescript-eslint/parser": "^4.14.0",
41-
"@wdio/cli": "^7.9.0",
42-
"@wdio/local-runner": "^7.9.0",
43-
"@wdio/mocha-framework": "^7.9.0",
44-
"@wdio/selenium-standalone-service": "^7.9.0",
45-
"@wdio/spec-reporter": "^7.9.0",
46-
"@wdio/sync": "^7.9.0",
41+
"@wdio/cli": "^7.12.1",
42+
"@wdio/local-runner": "^7.12.1",
43+
"@wdio/mocha-framework": "^7.12.0",
44+
"@wdio/selenium-standalone-service": "^7.10.1",
45+
"@wdio/spec-reporter": "^7.10.1",
46+
"@wdio/sync": "^7.12.1",
4747
"eslint": "^7.6.0",
4848
"kcd-scripts": "^11.1.0",
4949
"npm-run-all": "^4.1.5",
5050
"semantic-release": "^17.0.2",
5151
"ts-node": "^9.1.1",
52-
"typescript": "^4.1.3"
52+
"typescript": "^4.4.2"
5353
},
5454
"repository": {
5555
"type": "git",

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ function setupBrowser(browser: BrowserBase): WebdriverIOQueries {
246246
...args: Parameters<WebdriverIOQueries[QueryName]>
247247
) => {
248248
const body = await browser.$('body')
249-
return within(body)[queryName](...(args as any[]))
249+
return within(body as ElementBase)[queryName](...(args as any[]))
250250
}
251251

252252
// add query to response queries

src/wdio-types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ eslint-disable @typescript-eslint/no-explicit-any,
1111

1212
declare global {
1313
namespace WebdriverIO {
14-
interface Element extends ElementBase {}
14+
interface Element {}
1515
}
1616
}
1717

test/async/tsconfig.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"types": ["node", "jest", "webdriverio/async", "@wdio/mocha-framework"],
5-
"baseUrl": "."
4+
"types": ["node", "webdriverio/async", "@wdio/mocha-framework", "expect-webdriverio"],
5+
"baseUrl": ".",
6+
"skipLibCheck": false
67
},
78
"exclude": [],
89
"include": ["**/*.ts"]

test/sync/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"types": ["node", "jest", "webdriverio/sync", "@wdio/mocha-framework"]
4+
"types": ["node", "webdriverio/sync", "@wdio/mocha-framework", "expect-webdriverio"],
5+
"skipLibCheck": false
56
},
67
"exclude": [],
78
"include": ["**/*.ts"]

0 commit comments

Comments
 (0)