Skip to content

[Typescript] Syntax highlighting is broken for extends typeof in generic type index #870

@qwelias

Description

@qwelias

Issue Type: Bug

const a = [1]
type Test<A> = {
    2: 2;
    3: 3;
}[A extends typeof a ? 2 : 3];

After that syntax highlighting is broken down the file:
Screenshot from 2021-04-10 00-26-52

VS Code version: Code 1.55.0 (c185983a683d14c396952dd432459097bc7f757f, 2021-03-30T16:02:21.560Z)
OS version: Linux x64 5.11.11-arch1-1

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2100)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 31.02GB (19.79GB free)
Process Argv . --no-sandbox
Screen Reader no
VM 0%
DESKTOP_SESSION undefined
XDG_CURRENT_DESKTOP GNOME
XDG_SESSION_DESKTOP undefined
XDG_SESSION_TYPE tty
Extensions (19)
Extension Author (truncated) Version
lit-html bie 1.11.1
better-toml bun 0.3.2
mustache daw 1.1.1
vscode-eslint dba 2.1.19
gitlens eam 11.4.0
EditorConfig Edi 0.16.4
RunOnSave eme 0.2.0
terraform has 2.9.1
plantuml jeb 2.14.5
better-shellscript-syntax jef 1.1.0
vscode-phpfmt kok 1.0.30
theme-monokai-pro-vscode mon 1.1.19
gitlink qez 0.6.1
rust rus 0.7.8
vscode-fileutils sle 3.4.5
code-spell-checker str 1.10.2
vcl tho 0.1.2
shellcheck tim 0.14.0
vscode-lldb vad 1.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions