Skip to content Skip to sidebar Skip to footer

How To Make Vs Code Recognize The Es7 Bind Operator

VS Code does not recognize the ES7 bind syntax out of the box. Instead, it shows up as a syntax error: Example of highlighted error in code [ts] Declaration or statement expected.

Solution 1:

If you use Typescript, this is a Typescript error (although you would get the same error with JS). And Typescript is not planning to support the operator, mainly because the TC39 proposal is dead. There are not yet plans to support it in JS or TS, only Babel does (experimentally). It is not ES7, and it is not even planned to be in the specs somewhen, so it is a SyntaxError for a good reason.

After a lot of searching, there's so many articles on how it can be used

If those articles didn't mention that the operator is still in an early proposal phase, I wouldn't use them as reliable ressources anymore.

Post a Comment for "How To Make Vs Code Recognize The Es7 Bind Operator"