You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Importing the webdriverio package directly also declares async types for
browser APIs - this was missed due to sync mode tests using javascript
to avoid conflicts with the global declarations of command types.
To fix compilation of sync mode projects the types for the methods used
by the lib are manually defined instead of using WebdriverIO types
directly. In order to ensure the WebdriverIO.Element type the queries
return is correct a WebdriverIO namespace with an empty Element
interface is declared; the queries return this empty interface so that
the end user can hydrate the interface with the correct types for the
mode of WebdriverIO they are using.
BREAKING CHANGE: users will now need to include WebdriverIO types in
their tsconfig.json in order to hydrate the WebdriverIO.Element type.
In order to verify the lib compiles for both async and sync mode
projects the test folder has been reorganised into two sets of tests:
those that use async mode and those that use sync mode. To achieve this
a tsconfig is included in each directory that includes the corresponding
WebdriverIO types for their mode. In order to verify each test mode
compiles correctly `typecheck` npm scripts have been added and are used
in the validate script.
0 commit comments