microsoft / microsoft/TypeScript-TmLanguage

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

オープン
#1,058 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
TypeScript
スター
471
フォーク
149
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

import defer 構文に対応する TypeScript の TextMate 文法エントリから始め、defer トークンに現在どのようなスコープが付与されているかを確認します。VS Code 1.103.0 で Developer: Inspect Editor Tokens and Scopes を使用して結果を再現し、その後、defer が variable.other.readwrite.alias.ts ではなく import.control.defer.ts を報告することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
tooling
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。