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.
- I've searched around to see if there's an extension that can help recognize it to no avail.
- I've also tried to configure VS Code to use my own
.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.
["foo", "bar"]::toClassName()
will be converted totoClassName.call(["foo","bar"])
So I would agree with you. The bind syntax should not be used in production. Your comment isn't adding to the discussion. – Victor