Some Playwright types now reported as `any` after upgrading to 5.7.2

オープン
#60,619 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
compilers

調査の方向性

リンクされている pw-repro リポジトリの最小再現から始め、TypeScript 5.6.3 と 5.7.2 での動作を比較します。影響を受ける Playwright 拡張機能のコードを重点的なケースとして使用し、その後、リンクされている Playwright issue と TypeScript の回帰動作を確認します。影響を受ける値が any として報告されなくなり、5.7.2 の型チェックエラーが解消されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Domain: check: Type Inference Help Wanted Possible Improvement
🔎 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:
https://github.com/microsoft/playwright/issues/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.

主要言語
Go
スター
111k
フォーク
14.4k
平均マージ
1日 19時間
マージ済み PR(30日)
117

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/TypeScript のほかの issue

microsoft/TypeScript の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。