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.
.eslintrc
, which also doesn't seem to work. So far I haven't even been able to confirm VS Code recognizes my .eslintrc
file and is using it for its own config.Does anyone have an idea of how to configure VS Code to recognize the syntax? I realize it's a Stage 0 feature, however I feel it's fairly common at this point. I also realize what I'm seeing is a TypeScript error, however disabling TypeScript linting does not remove the error. I think it just shows up as a TypeScript error, inherited from JavaScript.
After a lot of searching, there's so many articles on how it can be used, but almost nothing when it comes to VS Code.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With