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

$ or $$ are not recognised in V7 working fine in V5 #42

Closed
diwakar-jha3110 opened this issue Jul 22, 2021 · 1 comment
Closed

$ or $$ are not recognised in V7 working fine in V5 #42

diwakar-jha3110 opened this issue Jul 22, 2021 · 1 comment

Comments

@diwakar-jha3110
Copy link

Cannot find name '$'. Do you need to install type definitions for jQuery

Also issue with the types as import element = WebdriverIO.Element;
WebdriverIO is getting picked from @wdio/sync not from @wdio/mocha-framework

tsConfig.json is as below
{
"compilerOptions": {
"baseUrl": ".",
"lib": ["es2017", "dom"],
"module": "commonjs",
"target": "es6",
"strict": false,
"strictNullChecks": false,
"resolveJsonModule": true,
"typeRoots": [
"./declarations", "./node_modules/@types", "./node_modules/@wdio/@types", "./node_modules/webdriverio/async", "./node_modules/@wdio/mocha-framework"],
"exclude": ["node_modules"]
}

@christian-bromann
Copy link
Member

@diwakar-jha3110 thanks for raising an issue. Please see https://webdriver.io/docs/typescript#framework-setup, you need to set the types property in your tsconfig file, e.g.:

{
    "compilerOptions": {
        "types": ["node", "webdriverio/sync", "@wdio/mocha-framework"]
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants