microsoft / microsoft/TypeScript-TmLanguage
Broken syntax highlighting for generic function with optional type in Typescript JSX
オープン
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 471
- フォーク
- 149
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Type: Bug
Inside of a new .tsx file, create the following code:
type GenericType<T> = boolean;
const testGeneric = <T = void,>(): GenericType<T> => {
return true;
};
const testGeneric2 = <T,>(): GenericType<T> => {
return true;
};
Every => after the <T = void,> will be incorrectly highlighted.

VS Code version: Code 1.75.1 (Universal) (441438abd1ac652551dbe4d408dfcec8a499b8bf, 2023-02-08T21:34:59.000Z)
OS version: Darwin arm64 22.2.0
Modes:
Sandboxed: No
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 Pro (8 x 24) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
| Load (avg) | 2, 2, 2 |
| Memory (System) | 16.00GB (0.09GB free) |
| Process Argv | --crash-reporter-id b866acdc-8967-448e-b6c1-00876386ce17 |
| Screen Reader | no |
| VM | 0% |
Extensions (20)
| Extension | Author (truncated) | Version |
|---|---|---|
| vscode-tailwindcss | bra | 0.9.7 |
| vscode-eslint | dba | 2.4.0 |
| vsc-material-theme-icons | equ | 2.5.0 |
| prettier-vscode | esb | 9.10.4 |
| git-graph | mhu | 1.30.0 |
| theme-monokai-pro-vscode | mon | 1.2.0 |
| vscode-docker | ms- | 1.24.0 |
| isort | ms- | 2022.8.0 |
| python | ms- | 2023.2.0 |
| vscode-pylance | ms- | 2023.2.40 |
| jupyter | ms- | 2023.1.2010391206 |
| jupyter-keymap | ms- | 1.0.0 |
| jupyter-renderers | ms- | 1.0.14 |
| vscode-jupyter-cell-tags | ms- | 0.1.6 |
| vscode-jupyter-slideshow | ms- | 0.1.5 |
| code-spell-checker | str | 2.17.1 |
| vscode-stylelint | sty | 1.2.4 |
| vscode-icons | vsc | 12.2.0 |
| gitblame | wad | 10.1.0 |
| vscode-todo-highlight | way | 1.0.5 |
(6 theme extensions excluded)
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
vscccc:30610679
pyindex848:30662994
nodejswelcome1:30587005
3biah626:30602489
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
2i9eh265:30646982
funwalk2cf:30671525
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供された TypeScript JSX スニペットを新しい .tsx ファイルで使用して、ハイライトの問題を再現します。次に、TypeScript-TmLanguage の文法ファイルを調べ、ジェネリック関数の構文がどのように分類されるかを追跡します。表示された例が VS Code で正しくハイライトされ、後続の => トークンが誤ってハイライトされなければ完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript, vscode
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100