microsoft / microsoft/TypeScript
Find all references for ambient module
未关闭
还没有人认领这个 Issue。
Domain: API
Help Wanted
Suggestion
- 主要语言
- Go
- 星标
- 111k
- 派生
- 14.3k
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 132
描述
// declarations.d.ts
declare module "x" {
export const x: number;
}
// index.ts
import {x} from "x";
Goto-declaration for "x" in index.ts works, but find-all-references for "x" in declarations.d.ts finds only itself.
In this case one can simply look through each of export in the module's body and find all of their references; but for shorthand ambient modules (declare module "x";) that won't work, as there is no module body.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用 declarations.d.ts 和 index.ts 片段重现该行为,然后跟踪 ambient module 及其导出符号的 find-all-references 路径。当从 declarations.d.ts 执行搜索时包含来自 index.ts 的引用,并且同时处理简写的 ambient modules,即表示完成;为这两种形式添加或更新覆盖范围。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100