microsoft / microsoft/TypeScript
Declare method quick fix should ask for method visibility and return type
还没有人认领这个 Issue。
- 主要语言
- Go
- 星标
- 111k
- 派生
- 14.4k
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 117
描述
🔍 Search Terms
declare method quick fix snippet mode
✅ Viability Checklist
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
⭐ Suggestion
TS offers a quick fix to declare a method:
As you can see, its quite involved to fix method visibility and return type later.
It would be great if I would be put into snippet mode with tab stops at method visibility and return type to quickly add these.
An example for what snippet mode can do:
📃 Motivating Example
Powerful method declare quick fix support in snippet mode.
💻 Use Cases
- What do you want to use this for?
Quick fix add missing methods easily.
- What shortcomings exist with current approaches?
You have to manually edit the method visibility and return type.
- What workarounds are you using in the meantime?
None.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在 TypeScript 代码库中查找 declare-method quick fix 及其 snippet 生成测试。阅读 quick fix 当前如何创建方法,并为方法可见性和返回类型添加 snippet 制表位;完成的标准是生成的方法进入 snippet 模式,并支持快速编辑这两项。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- developer-experience
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100