microsoft / microsoft/TypeScript

Show deprecation warnings on implementations of a deprecated property

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

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

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

説明

🔎 Search Terms
  • Deprecated implementation
  • Deprecated interface

Related https://github.com/microsoft/typescript/issues/57584

🕗 Version & Regression Information

Not a regression

⏯ Playground Link

No response

💻 Code
type I = {
    /**
     * @deprecated
     */
    text: string;
};

function f(i: I) { return i; }
f({ text: 'a' });

const a: I = { text: 'a' }
a.text;
🙁 Actual behavior

Currently only the last use of a.text shows as deprecatedImage

🙂 Expected behavior

It would be helpful to also render deprecations for any implementations of I.text too as these are also using the deprecated property

Additional information about the issue

No response

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

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

はじめの一歩

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

調査の方向性

まず issue の TypeScript の例を再現し、オブジェクトリテラル、a への代入、後続の a.text へのアクセスについて診断を比較します。これらの実装箇所に対する非推奨プロパティの処理を追跡します。完了条件は、a.text に対する既存の警告を失うことなく、I.text の実装が非推奨警告を明確に受け取ることです。

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

評価

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

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

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