microsoft / microsoft/TypeScript
Show deprecation warnings on implementations of a deprecated property
Nobody has claimed this yet.
- 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 deprecated
🙂 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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