Closed maxnordlund closed 9 years ago
Both issue were fixed, but you will need to remove the type annotation to check it. Currently, type annotation is not under TC39's discussion. So I have no plan to support it right now.
I think type annotation will merge into JavaScript one day. But its still unclear when and how it looks like.
Awesome, that's much nicer. Yes, I forgot to remove the annotations.
Since ES6 allows methods to be named to pretty much anything, like
return
orthrow
, it would be nice if yajs correctly highlighted this as method names, instead of marking it as a syntax error. The same goes for computed method names, e.g.[Symbol.iterator]
. The latter seams to mess up the following return statement, which is sad.For comparison it works as intended when highlighted as TypeScript, which is a superset of JavaScript.