microsoft / TypeScript-TmLanguage

TextMate grammar files for TypeScript for VS Code, Sublime Text, and Atom.
MIT License
398 stars 125 forks source link

TypeScript syntax highlighting bug (1.69) #923

Closed WhosyVox closed 1 year ago

WhosyVox commented 2 years ago

Syntax highlighting appears to break for tokens such as 'export' and 'return' when presented with a snippet of code with the exact formatting:

const x = <a extends b>
( args:a ):a => {
  return args;
}

Removing the braces does not seem to help.

This does not occur however if you do either of the following:

Remove the newline after the template list:

const x = <a extends b> ( args:a ):a => {
  return args;
}

Remove the extends:

const x = <a>
( args:a ):a => {
  return args;
}

image