microsoft / microsoft/TypeScript-TmLanguage
Generic constructor with more than one generic type can break syntax highlighting.
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 471
- フォーク
- 149
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
JavaScript and TypeScript Nightly version:
Last released - 4/4/2023, 02:09:37
Last updated - 4/4/2023, 18:09:42
Code
export class Foo {
readonly bar = {
map: new Map<
Type1, Type2>([])
};
private function() {
return 1;
}
}
The code above breaks syntax highlighting, I have also tested in insiders vscode with nightly typescript.

It is fine, if both generics are on the same line as the main type:

If there is only 1 generic, it does slightly better, the highlighting of the generic is wrong, but the rest of the file is ok.

Or if the argument to the constructor is not a list, this it is also recoverable, although both the highlighting of the generic, and the closing angle bracket are wrong.

コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ソースファイルもテストも指定されていません。まず issue にある複数行の TypeScript ジェネリックコンストラクターの例を再現し、動作するバリアントと比較して、構文ハイライトを担っている TypeScript TextMate 文法を追跡してください。示されたコードとその周囲のファイルで正しいハイライトが維持されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript, vscode
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100