Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Typescript updates for async/sync #8131

Merged
merged 2 commits into from Mar 21, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions website/docs/TypeScript.md
Expand Up @@ -99,7 +99,7 @@ command execution. For more information, see our <a href="https://github.com/web
</TabItem>
</Tabs>

Please avoid importing `webdriverio` or `@wdio/sync` explicitly.
Please avoid importing `webdriverio` or `@wdio/async` explicitly.
christian-bromann marked this conversation as resolved.
Show resolved Hide resolved
`WebdriverIO` and `WebDriver` types are accessible from anywhere once added to `types` in `tsconfig.json`. If you use additional WebdriverIO services, plugins or the `devtools` automation package, please also add them to the `types` list as many provide additional typings.

## Framework Types
Expand All @@ -121,7 +121,7 @@ For instance, if you decide to use the Mocha framework, you need to install `@ty
```json title="tsconfig.json"
{
"compilerOptions": {
"types": ["node", "webdriverio/sync", "@wdio/mocha-framework"]
"types": ["node", "webdriverio/async", "@wdio/mocha-framework"]
}
}
```
Expand All @@ -132,7 +132,7 @@ For instance, if you decide to use the Mocha framework, you need to install `@ty
```json title="tsconfig.json"
{
"compilerOptions": {
"types": ["node", "webdriverio/sync", "@wdio/jasmine-framework"]
"types": ["node", "webdriverio/async", "@wdio/jasmine-framework"]
}
}
```
Expand All @@ -143,7 +143,7 @@ For instance, if you decide to use the Mocha framework, you need to install `@ty
```json title="tsconfig.json"
{
"compilerOptions": {
"types": ["node", "webdriverio/sync", "@wdio/cucumber-framework"]
"types": ["node", "webdriverio/async", "@wdio/cucumber-framework"]
}
}
```
Expand All @@ -160,7 +160,7 @@ If you use services that add commands to the browser scope you also need to incl
"compilerOptions": {
"types": [
"node",
"webdriverio/sync",
"webdriverio/async",
"@wdio/mocha-framework",
"@wdio/devtools-service"
]
Expand Down Expand Up @@ -240,8 +240,8 @@ With TypeScript, it's easy to extend WebdriverIO interfaces. Add types to your [
<Tabs
defaultValue="async"
values={[
{label: 'Sync', value: 'sync'},
{label: 'Async', value: 'async'},
{label: 'Sync', value: 'sync'},
]
}>
<TabItem value="sync">
Expand Down Expand Up @@ -294,8 +294,8 @@ declare global {
<Tabs
defaultValue="async"
values={[
{label: 'Sync', value: 'sync'},
{label: 'Async', value: 'async'},
{label: 'Sync', value: 'sync'},
]
}>
<TabItem value="sync">
Expand Down Expand Up @@ -366,7 +366,7 @@ declare namespace WebdriverIO {
"strictNullChecks": true,
"types": [
"node",
"webdriverio/sync",
"webdriverio/async",
"@wdio/mocha-framework"
]
},
Expand All @@ -393,7 +393,7 @@ declare namespace WebdriverIO {
"strictNullChecks": true,
"types": [
"node",
"webdriverio/sync",
"webdriverio/async",
"@wdio/mocha-framework"
]
}
Expand Down