Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Types for fixtures are broken in TypeScript 5.7.2 #33763

Closed
mrmckeb opened this issue Nov 26, 2024 · 6 comments · Fixed by #33784
Closed

[Bug]: Types for fixtures are broken in TypeScript 5.7.2 #33763

mrmckeb opened this issue Nov 26, 2024 · 6 comments · Fixed by #33784
Assignees
Labels

Comments

@mrmckeb
Copy link

mrmckeb commented Nov 26, 2024

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.
Image

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
@mxschmitt
Copy link
Member

mxschmitt commented Nov 26, 2024

I can repro. Bisecting results:

bad 5.7.0-dev.20240820 2192336dfee6f740b5828c8a4a8226e56626de1d
good 5.6.0-dev.20240819 2a8865e6ba95c9bdcdb9e2c9c08f10c5f5c75391

RANGE: microsoft/TypeScript@2a8865e...2192336

Also when trying to use TypeScript 5.7 inside the Playwright repository I get Found 76 errors in 41 files..

@mrmckeb
Copy link
Author

mrmckeb commented Nov 26, 2024

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.

@mxschmitt
Copy link
Member

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.

@mrmckeb
Copy link
Author

mrmckeb commented Nov 26, 2024

I've just raised that here: microsoft/TypeScript#60619

@bes
Copy link

bes commented Dec 19, 2024

The fix is merged to the repo but there is no release. Can we please have a smol release 🙏

@mxschmitt
Copy link
Member

We recommend Canary in the meantime: https://playwright.dev/docs/canary-releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants