microsoft / TypeScript-TmLanguage

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

Return argument not colored properly if multiline #1002

Open alexr00 opened 7 months ago

alexr00 commented 7 months ago

Type: Bug

When putting this into a TypeScript file:

type MyType<T> = { func: T };

function AFunction<T>(arg: T): MyType<T> {
    return { func: arg };
}

const x = AFunction<(arg: string) => unknown>(() => {});
const y = AFunction<
    (arg: string) => unknown
>(() => {});

The first unknown is colored but the second unknown is not for some reason.

Originally posted by @PythonCoderAS in https://github.com/microsoft/vscode/issues/199861