microsoft / microsoft/TypeScript

`@experimental` JSDoc tag, with strikethrough style (or similar) like `@deprecated` JSDoc tag

未关闭
#56,808 7 条评论 43 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Awaiting More Feedback Suggestion
主要语言
Go
星标
111k
派生
14.4k
平均合并
1 天 19 小时
30 天内合并 PR
117

描述

🔍 Search Terms

experimental jsdoc tag

✅ Viability Checklist
⭐ 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() {
  // ...
}
Screenshot 2023-12-16 at 5 28 49 PM
💻 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:

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先追踪现有的 @deprecated JSDoc 标签是如何被识别的,以及 IDE 如何呈现其视觉样式。确定涉及的语言服务和面向编辑器的入口点,然后定义 @experimental 的预期行为,并根据促成该需求的示例和现有 deprecated 标签的行为进行验证。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, typescript
领域
developer-experience, tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。