I'm a newcomer to Typescript and am struggling to see why I get this error:
At the top of the file I import expect
from Playwright:
import {expect} from "@playwright/test";
This function as shown comes from interface PageAssertions{ //
within the @playwright/test
declaration file test.d.ts
. However, I seem to be able to use any assertion that is in `expect-types.d.ts with no error.
I have tried installing following as both dev and standard dependency in my package.json:
"dependencies": {
"@playwright/test": "^1.28.1",
I don't have expect
being imported anywhere else (i.e. from Jest).
I see this in node-modules: