microsoft / microsoft/TypeScript

Heuristic/loose completions for the 'any' type

未关闭
#5,334 8 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

In Discussion Suggestion
主要语言
Go
星标
111k
派生
14.3k
平均合并
2 天 4 小时
30 天内合并 PR
132

描述

Motivation

Today, if you have a value of type 'any', dotting off of the value and requesting members for completion will return nothing back. The original motivation for this was that we should never risk giving users incorrect completions.

This is great for a fully typed TypeScript project. However, for those migrating to TypeScript, as well as those who need to drop down to any fairly frequently, this can be slightly frustrating.

For those used to the JS editing experience in editors like Sublime where they just "got completions", the current behavior might be seen as unattractive.

Proposal

We should consider adding a language service option for users to get "loose" completions akin to what we give in the Salsa language service.

We can still keep the warning for each completion, but we should provide completions with a builder.

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先阅读提案,并比较 issue 中提到的现有 Salsa 语言服务行为。确定用于宽松补全的语言服务选项的范围,包括警告应如何保持关联,以及什么样的补全行为可以表明该功能已经完成。

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

评估

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

把新 issue 发到你的邮箱

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