microsoft / TypeScript-TmLanguage

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

[Typescript] Broken arrow function signature highlighting #911

Open ilibar-zpt opened 2 years ago

ilibar-zpt commented 2 years ago

Does this issue occur when all extensions are disabled?: Yes

Syntax highlighting breaks on arrow functions with return type being multiline tuple, works fine on function declarations.

Steps to Reproduce:

const foo = ({ a, b }: any): [
    el1: number,
    el2: string,
] => {
    a
    b
    return [1, '2']
}

Expected highlight: Screenshot from 2022-05-05 13-52-26

Actual highlight: Screenshot from 2022-05-05 13-52-53