[Bug]: Types for fixtures are broken in TypeScript 5.7.2
Version
1.49.0
Steps to reproduce
Clone this repro, run pnpm i and see the issue in the example test.
https://github.com/mrmckeb/pw-repro
Expected behavior
Fixtures should work as they did in TypeScript 5.6.3.
The fixture in this example is copy-pasted from the Playwright docs, but I found this within our project with more complex fixtures in use.
Actual behavior
Fixtures now throw type errors, with values seemingly being any.
Confusingly, the JSDoc shows up correctly.
Additional context
This may be a TypeScript issue, and I'm happy to re-open there if that's the case.
I did look for related issues earlier and didn't find any.
Environment
System:
OS: macOS 14.7.1
CPU: (8) arm64 Apple M3
Memory: 477.89 MB / 24.00 GB
Binaries:
Node: 18.14.0 - ~/.local/state/fnm_multishells/66817_1732588561643/bin/node
npm: 9.3.1 - ~/.local/state/fnm_multishells/66817_1732588561643/bin/npm
pnpm: 9.14.2 - ~/.local/state/fnm_multishells/66817_1732588561643/bin/pnpm
IDEs:
VSCode: 1.95.3 - /usr/local/bin/code
Languages:
Bash: 3.2.57 - /bin/bash
npmPackages:
@playwright/test: ^1.49.0 => 1.49.0
I can repro. Bisecting results:
bad 5.7.0-dev.20240820 2192336dfee6f740b5828c8a4a8226e56626de1d good 5.6.0-dev.20240819 2a8865e6ba95c9bdcdb9e2c9c08f10c5f5c75391
RANGE: https://github.com/microsoft/typescript/compare/2a8865e6ba95c9bdcdb9e2c9c08f10c5f5c75391...2192336dfee6f740b5828c8a4a8226e56626de1d
Also when trying to use TypeScript 5.7 inside the Playwright repository I get Found 76 errors in 41 files..
Thanks for looking into this @mxschmitt. This may be a TypeScript regression/issue, and happy to raise there if you think that's the case.
We should probably at least create a tracking issue for visibility - since it seems like a regression on their side. Do you mind filing it?
Maybe we can workaround it on our side - we'll see. I assigned it to the next release so we'll pick it up.
I've just raised that here: https://github.com/microsoft/TypeScript/issues/60619
The fix is merged to the repo but there is no release. Can we please have a smol release 🙏
We recommend Canary in the meantime: https://playwright.dev/docs/canary-releases