Incorrect Token Scoping for defer Keyword in TypeScript 5.9 in VSCode
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- tooling
调研方向
从与 import defer 语法匹配的 TypeScript TextMate 语法条目开始,检查 defer token 当前的作用域。使用 Developer: Inspect Editor Tokens and Scopes 在 VS Code 1.103.0 中重现结果,然后验证 defer 报告的是 import.control.defer.ts,而不是 variable.other.readwrite.alias.ts。
由索引模型根据 Issue 内容生成。
描述
Type: Bug
With the release of TypeScript 5.9, a new feature supporting the import defer functionality has been introduced. However, when using VSCode's "Developer: Inspect Editor Tokens and Scopes" to inspect the defer keyword, it is currently scoped as variable.other.readwrite.alias.ts instead of the expected import.control.defer.ts. This issue prevents the proper application of style changes using TextMate.
It seems that the defer keyword should be correctly scoped under the import.control.defer.ts range as mentioned above.
Thank you.
VS Code version: Code 1.103.0 (e3550cfac4b63ca4eafca7b601f0d2885817fd1f, 2025-08-06T21:40:10.271Z)
OS version: Darwin arm64 24.6.0
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | Apple M2 Pro (10 x 2400) |
| GPU Status | 2d_canvas: enabled direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: enabled_on trees_in_viz: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | 2, 2, 2 |
| Memory (System) | 16.00GB (1.27GB free) |
| Process Argv | --crash-reporter-id 02ee976f-ec4c-41ed-91a6-793656140857 |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368:30146709
vswsl492:30256859
pythonvspyt551:31249599
binariesv615:30325510
vscrp:30673768
nativeloc1:31344060
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythoneinst12:31285622
c7cif404:31314491
996jf627:31283433
pythonrdcb7:31342333
usemplatestapi:31297334
0aa6g176:31307128
747dc170:31275177
aj953862:31281341
pylancequickfixf:31358881
9d2cg352:31346308
convertlamdaf:31358879
usemarketplace:31343026
nesew2to5:31336538
1292j425:31332164
agentclaude:31350858
replacestringexc:31350595
nes-set-on:31351930
testaa123cf:31335227
6abeh943:31336334
yijiwantestdri0626-c:31336931
0927b901:31350571
4gdec884:31348710
45650338:31358607
0cj2b977:31352657
gaj49834:31362110
asdad-cf:31365767
showgoogle:31363597
- 主要语言
- TypeScript
- 星标
- 471
- 派生
- 149
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/TypeScript-TmLanguage 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
microsoft/TypeScript-TmLanguage#1071 ·
-
triste 未关闭
难度 5/5 一周以上 新手友好度 5/100
microsoft/TypeScript-TmLanguage#1078 ·
-
难度 3/5 1-2 天 新手友好度 68/100
microsoft/TypeScript-TmLanguage#1076 · 6 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 55/100
microsoft/TypeScript-TmLanguage#1074 · 2 条评论 ·
-
难度 1/5 1-3 小时 新手友好度 58/100
microsoft/TypeScript-TmLanguage#1066 · 1 条评论 ·
查看 microsoft/TypeScript-TmLanguage 的全部 Issue
相似的 Issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
Crush 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
catppuccin/catppuccin#3125 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
ElementsProject/cln-application#167 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 75/100
Quantco/pnpm-licenses#17 ·
-
难度 2/5 1-3 小时 新手友好度 75/100