Autocompletion
If you have been writing program code for a while, you probably like autocompletion. Autocomplete is available out of the box in many code editors.
Type definitions based on JSDoc is used for documenting code. It helps to see more additional details about parameters and their types.
Use standard shortcuts ⇧ + ⌥ + SPACE on IntelliJ Platform to see available documentation:
TypeScript
For TypeScript please see TypeScript
Visual Studio Code (VSCode)
It's required to create jsconfig.json
in project root and refer to used wdio packages to make autocompletion work in vanilla js. See examples below.
Sync version (you have @wdio/sync
package installed) with Mocha
{
"include": [
"**/*.js",
"**/*.json",
"node_modules/@wdio/sync",
"node_modules/@wdio/mocha-framework"
]
}
Async version with Cucumber
{
"include": [
"**/*.js",
"**/*.json",
"node_modules/webdriverio"
"node_modules/@wdio/cucumber-framework"
]
}
IntelliJ
Autocompletion works out of the box in IDEA and WebStorm.