After adding webdriverio to a typescript project, all kinds of errors like this appear during transpilation:
error TS2694: Namespace 'global.WebdriverIO' has no exported member 'Element'.
221 export interface ElementBase extends InstanceBase, ElementReference, CustomInstanceCommands<WebdriverIO.Element> {
I see in the webdriverio docs that some types files need to be added to tsconfig like so:
{
"compilerOptions": {
"types": ["node", "webdriverio/async"]
}
}
However, this causes typescript to ignore everything that's in the node_modules/@types folder (besides, I believe, @types/node). Looking at node_modules/webdriverio/async.d.ts, I can see that the namespace WebdriverIO is in there.
How can webdriverio/async.d.ts to typescript transpilation without ignoring all of those essential types?