-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
Description
Version
1.46.0
Steps to reproduce
- Clone my repo at
https://github.com/halljus/playwright-bug-repro(deleted now that issue is closed) - Run
npm install - Run
npm run typecheck - Observe TypeScript errors that parameters passed to a
test.extendthat is a child of anextendwithout a generic type parameter are typed asany.
Expected behavior
I expect parameters passed to a child extend<MyFixtures> with a test.extend parent to be fully typed as they were prior to v1.46.0.
Actual behavior
As of v1.46.0, any extend<MyFixtures> with a generic type parameter that follow a parent test.extend without a generic type parameter will receive untyped arguments (they'll be of type any).
Additional context
I can "fix" this by moving the extend without the generic type parameter AFTER the extend<MyFixtures>, but a) it worked before, and b) I'm not sure if that's equivalent behavior.
Environment
System:
OS: Windows 10 10.0.19045
CPU: (12) x64 13th Gen Intel(R) Core(TM) i5-1345U
Memory: 39.83 GB / 63.64 GB
Binaries:
Node: 20.13.1 - ~\AppData\Local\nvs\default\node.EXE
npm: 10.8.2 - ~\AppData\Local\nvs\default\npm.CMD
IDEs:
VSCode: 1.92.0 - C:\Users\user\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
Languages:
Bash: 5.1.16 - C:\WINDOWS\system32\bash.EXE
npmPackages:
@playwright/test: 1.46.0 => 1.46.0
