yuezk / vim-js

💯The most accurate syntax highlighting plugin for JavaScript and Flow.js
MIT License
140 stars 8 forks source link

Incorrect syntax highlighting when specifying return value type #10

Closed sudokey closed 4 years ago

sudokey commented 4 years ago
const x = (): number => {
    const test = 1; // Incorrect syntax highlighting
};
yuezk commented 4 years ago

@sudokey Thanks for your feedback. It's a bit complex to fix syntax highlight for an arrow function with a return type, but I will try.

Currently, you can use the normal function as a workaround.

const x = function(): number {
    const test = 1;
};
yuezk commented 4 years ago

@sudokey After a further investigation, it seems not so complex to fix, addressed in latest code. Welcome to your feedback.