Skip to content

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

Closed
@mrmckeb

Description

@mrmckeb

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions