Describe the bug
The return types on some of the functions supplied by types/index.d.ts appear to be incorrect. The one I am currently encountering is for checkFullPageScreen. When writing await browser.checkFullPageScreen('...'), I receive the message
ESLint: Unexpected `await` of a non-Promise (non-"Thenable") value.(@typescript-eslint/await-thenable)
In the index.d.ts file, it has the return type as Result without a promise, while the actual function in webdriver-image-comparison has the return type of Promise<ImageCompareResult | number>.
To Reproduce
Steps to reproduce the behavior:
Something like this will show the error if you have ESLint installed:
Environment (please complete the following information):
Config of WebdriverIO + wdio-image-comparison-service tsconfig:
Describe the bug The return types on some of the functions supplied by
types/index.d.ts
appear to be incorrect. The one I am currently encountering is forcheckFullPageScreen
. When writingawait browser.checkFullPageScreen('...')
, I receive the messageIn the
index.d.ts
file, it has the return type asResult
without a promise, while the actual function inwebdriver-image-comparison
has the return type ofPromise<ImageCompareResult | number>
.To Reproduce Steps to reproduce the behavior:
Something like this will show the error if you have ESLint installed:
Expected behavior It should not show the error because if the return type supports promises, it will allow it to be awaited.
Log n/a
Additional context n/a