microsoft / microsoft/TypeScript

Show deprecation warnings on implementations of a deprecated property

Open
#60,442 4 comments 16 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Experience Enhancement Suggestion
Dominant language
Go
Stars
111k
Forks
14.4k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

🔎 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the TypeScript example in the issue and compare the diagnostics for the object literal, the assignment to a, and the later a.text access. Trace the deprecated-property handling for these implementation sites; done means implementations of I.text visibly receive deprecation warnings without losing the existing warning on a.text.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.