-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
"@wdio/cucumber-framework": "^8.16.19"
Node.js Version
v18.12.1
Mode
WDIO Testrunner
Which capabilities are you using?
No response
What happened?
I'm trying to migrate from WDIO 7 to WDIO 8, and getting a TS error "'DataTable' refers to a value, but is being used as a type here. Did you mean 'typeof DataTable'?ts(2749)".
What is your expected behavior?
DataTable to be used as type parameter without errors
How to reproduce the bug.
The below code will show two TS errors:
- 'DataTable' is declared but its value is never read.ts(6133)
- 'DataTable' refers to a value, but is being used as a type here. Did you mean 'typeof DataTable'?ts(2749)
import { DataTable, When } from '@wdio/cucumber-framework'
When(/test/, async (table: DataTable) => {
const rows = table.rows()
})tsconfig.json
{
"compilerOptions": {
"experimentalDecorators": true,
"allowJs": false,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"checkJs": false,
"moduleResolution": "node",
"types": [
"node",
"@wdio/globals/types",
"@wdio/cucumber-framework",
"expect-webdriverio",
"wdio-intercept-service",
"mocha",
],
"target": "ES2022",
"lib": [
"ES2022"
],
"noImplicitAny": true,
"noImplicitThis": true,
"noImplicitReturns": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"noPropertyAccessFromIndexSignature": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noEmit": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
"skipLibCheck": true,
"strict": true
},
"include": [
"src",
],
"exclude": [
"node_modules",
]
}Relevant log output
not applicableCode of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues
Reactions are currently unavailable