microsoft / microsoft/TypeScript-TmLanguage

TypeScript - incorrect highlighting when a new line is added

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

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

主要言語
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:

  1. 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.):

incorrect

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.

correct

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

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

はじめの一歩

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

調査の方向性

提供された TypeScript スニペットを使用して、VS Code 1.63.2 または同等の環境で報告内容を再現し、まず空行によって生じるハイライトの変化を確認します。次に、このリポジトリ内の TypeScript TextMate 文法ファイルを追跡し、ジェネリック型とそれに続く宣言を処理するルールを見つけます。空行がある場合とない場合の両方で、let、const、function などのキーワードが正しくハイライトされれば完了です。

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

評価

技術スタック
typescript
領域
tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

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

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