HerringtonDarkholme / yats.vim

Yet Another TypeScript Syntax: The most advanced TypeScript Syntax Highlighting in Vim
Vim License
651 stars 67 forks source link

Typscript: Immediately invoked function expression with return type annotation broken. #138

Open kid-icarus opened 5 years ago

kid-icarus commented 5 years ago

Example:

const foo = (function(): string  {
  // No good!
  var foo = 'foo'
  return foo
})()

image

Removing the return type annotation, everything works as expected:

image

HerringtonDarkholme commented 4 years ago

This is a fundamental difficulty in the arrow function detection....