Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Incorrect Token Scoping for ⁠defer Keyword in TypeScript 5.9 in VSCode

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

还没有人认领这个 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%
Extensions disabled
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

贡献指南

这个仓库没有索引到贡献指南

从这里开始

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

microsoft/TypeScript-TmLanguage 的其他 Issue

查看 microsoft/TypeScript-TmLanguage 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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