Skip to content

Some Playwright types now reported as any after upgrading to 5.7.2Β #60619

@mrmckeb

Description

@mrmckeb

πŸ”Ž Search Terms

I manually scrolled through all issues reported since the release of 5.7.2.

πŸ•— Version & Regression Information

  • This changed between versions 5.6.3 and 5.7.2

⏯ Playground Link

https://github.com/mrmckeb/pw-repro

πŸ’» Code

Minimal repro available here:
https://github.com/mrmckeb/pw-repro

The Playwright team are also able to reproduce:
microsoft/playwright#33763

The affected code (from the repro) is:

import { test as base, expect } from "@playwright/test";

const test = base.extend({
  // baseUrl, page, use are now `any`
  page: async ({ baseURL, page }, use) => {
    await page.goto(baseURL);
    await use(page);
  },
});

πŸ™ Actual behavior

Types that were previously available are now typed as any. JSDoc continues to work as expected.

πŸ™‚ Expected behavior

Types behave as they did in TypeScript 5.6.3.

Additional information about the issue

We found this issue when upgrading from 5.6.3 to 5.7.2. I couldn't find a related issue here, so raised it at the Playwright repo to at least verify that they could reproduce and that they didn't think it was an issue with their types.

The Playwright team also confirmed that they have 71 new errors across 41 files when moving to TypeScript 5.7.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some cases

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions