interface Options are not recognised in the code after migration from v6 to v7 #13
Replies: 2 comments 2 replies
-
I must say that i didn't use codemod and was doing everything manually (there is not that many files that need to be changed). |
Beta Was this translation helpful? Give feedback.
-
@denis-a1qa , this is because using "declare global" in the type definition file causes it to be recognized as a "module" rather than an ambient type definition file by typescript. If you are using ambient type definition files, e.g., *.d.ts files anywhere in the project that get picked up as type definition files without specifying them in includes/files, then you can't have any export, import or declare global statements in them. The solution is simply to change the declaration to
(which it sounds like you had before; some people were using I believe the documentation was updated to make the distinction between module and ambient type def files as part of webdriverio/webdriverio#6719. |
Beta Was this translation helpful? Give feedback.
-
Hello!
In v6 we were using following interfaces to expand webdriverio (it might be incorrect but it was working fine across project):
we were able to access config properties anywhere without any typescript errors (autocomplete was also working fine)
But after upgrading to v7 and chnaing code to the following one:
We no longer see custom config properties and need to use "hacks" with any:
Any ideas how to fix that? It doesn't affect test executions but I really hate using
as any
Beta Was this translation helpful? Give feedback.
All reactions