microsoft / microsoft/TypeScript-TmLanguage
typescript type textMate scopes highlighting error
未关闭
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 471
- 派生
- 149
- PR 合并指标
- 30 天内没有已合并 PR
描述
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: 1.84.1
- OS Version: macOS 14.0
I have the following TypeScript code, and its return type is a union type. However, the colors for syntax highlighting are inconsistent in the same location (data and arg). I found that this is due to their different TextMate scopes.
declare function getCb():
| { data: string; cb: (arg: string) => void }
| { data: number; cb: (arg: number) => void }
like :
scopes :
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在 macOS 上的 VS Code 1.84.1 中复现所提供的联合类型代码片段,并检查报告中显示的 TextMate 作用域。追踪用于对 data、arg 及其类型进行分类的 TypeScript TextMate 语法规则;完成的标准是等价构造获得一致的语法高亮,同时不改变其他无关的 TypeScript 作用域。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100