microsoft / microsoft/TypeScript
[Typescript] Give a visual indicator when overriding methods with the `@sealed` js/tsdoc annotation
还没有人认领这个 Issue。
- 主要语言
- Go
- 星标
- 111k
- 派生
- 14.3k
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 132
描述
I notice that vscode has builtin support for reading the `@deprecated` jsdoc / tsdoc annotation that can appear on methods and variables, which causes them to appear with a strikethrough.
It would be useful if there was a similar visual indicator when a subclass attempts to override a method that is marked as [`@sealed`](https://tsdoc.org/pages/tags/sealed/) in its superclass, or when it tries to inherit from a `sealed` superclass. (not a strikethrough, but perhaps squiggles, or any kind of feedback).
Given that there is already machinery that looks through the class hierarchy to determine that a field defined in a parent class is marked as deprecated, I would presume it wouldn't be that difficult to also identify the `@sealed` annotation.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先定位现有的 @deprecated 注解处理逻辑,以及 issue 中提到的类层次结构查找逻辑。确定 @sealed 是如何表示的,以及 override 或继承反馈在哪里生成;当一个 override sealed 方法的子类,或从 sealed 超类继承的子类,能够收到可见的诊断信息或指示器时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- compilers
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100