microsoft / microsoft/TypeScript
`@experimental` JSDoc tag, with strikethrough style (or similar) like `@deprecated` JSDoc tag
还没有人认领这个 Issue。
- 主要语言
- Go
- 星标
- 111k
- 派生
- 14.4k
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 117
描述
🔍 Search Terms
experimental jsdoc tag
✅ 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
I would like to mark some new APIs as "experimental" with an @experimental JSDoc tag, and have people's IDE's show a visual hint (like how @deprecated styles text with strike-through)
📃 Motivating Example
There's no way (unless I missed it) to introduce an experimental feature and to have that reflected in IDEs like @deprecated does. Example:
/**
* @experimental Not ready for production. This feature is slated to land in the next minor. Early feedback welcome!
*/
export function doSomethingNewAndCool() {
// ...
}
and then IDEs would highlight this in a certain way in the code, for example like how @deprecated styles text with a strike through.
/**
* @deprecated Not ready for production. This feature is slated to land in the next minor and be un-deprecated. Early feedback welcome!
*/
export function doSomethingNewAndCool() {
// ...
}
💻 Use Cases
See motivating example.
For now, a workaround is to use @deprecated, then clearly denote that the feature will be un-deprecated in a following release, but some people might misinterpret that or not read the whole message:
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先追踪现有的 @deprecated JSDoc 标签是如何被识别的,以及 IDE 如何呈现其视觉样式。确定涉及的语言服务和面向编辑器的入口点,然后定义 @experimental 的预期行为,并根据促成该需求的示例和现有 deprecated 标签的行为进行验证。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, typescript
- 领域
- developer-experience, tooling
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100