microsoft / microsoft/TypeScript-TmLanguage
TypeScript - incorrect highlighting when a new line is added
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 471
- フォーク
- 149
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.63.2
- OS Version: Windows_NT x64 6.3.9600
Steps to Reproduce:
- Paste the code below to the VS Code
type testType = {
on<Key extends string>
(eventName: `${Key}Changed`): void;
}
let a = 1;
The result is, that the "let" keyword is highlighted incorrectly. Same happens with any other keyword (const, function, etc.):

After removing the new line between the second and the third line, everything works correctly. The content of the third line doesn't matter; there could be only parentheses as well.

コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供された TypeScript スニペットを使用して、VS Code 1.63.2 または同等の環境で報告内容を再現し、まず空行によって生じるハイライトの変化を確認します。次に、このリポジトリ内の TypeScript TextMate 文法ファイルを追跡し、ジェネリック型とそれに続く宣言を処理するルールを見つけます。空行がある場合とない場合の両方で、let、const、function などのキーワードが正しくハイライトされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100