chroma icon indicating copy to clipboard operation
chroma copied to clipboard

TypeScript lexer fails to highlight string literal generics

Open SKalt opened this issue 4 months ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the bug

In TypeScript, string constants are valid types. Here's an screenshot from the syntax highlighting in VSCode: Screenshot from 2024-10-14 07-54-45

Contrast with the syntax highlighting in the most recent version of chroma:

Screenshot from 2024-10-14 07-56-33

Note that the syntax error with the comma was resolved in #1002.

To Reproduce

type T<U> = Complicated<U, "stuff">
//                         ^-----^
//    not highlighted as a literal

playground link

SKalt avatar Oct 14 '24 11:10 SKalt