Visual Studio + ES6
I have been asked recently about ES6 support in Visual Studio (VS), and I haven’t had a clear answer about how much of it is supported right now (i.e., VS 2015 RC) and what works. The general feeling from those asking is that VS lags significantly in this space, so the only reasonable thing to do was test this thoroughly and share my findings with you.
Using Luke Hoban’s awesome page on ES6 features, I identified a comprehensive list to test. I then evaluated each feature in VS 2015 RC and in VS Code (our new lightweight, cross-platform, free IDE). Ultimately, Visual Studio supports 70% of ES6 features, while VS Code supports 94%. But what does "implemented" mean here? It means no errors are raised, and the IDE provides correct IntelliSense behavior. Both IDEs are actively improving, but this gives a solid baseline for discussion.
I determined support by assigning a score:
- 1 (fully works)
- 0.5 (partially works, with noted issues)
- 0 (doesn’t work).
One feature, the Reflect API, wasn’t included as I don’t yet have a working example to test it. If you spot any errors in my findings, please let me know—I’ll happily update this!
| Feature | VS | Code |
|---|---|---|
| Arrows | 1 | 1 |
| Classes | 0.51 | 1 |
| Enhanced Object Literals | 1 | 1 |
| Template Strings | 1 | 1 |
| Destructuring | 0 | 1 |
| Default + Rest + Spread | 0.52 | 1 |
| Let + Const | 1 | 0.83 |
| Iterators + For..Of | 1 | 1 |
| Generators | 0 | 1 |
| Unicode | 0 | 1 |
| Modules | 0 | 1 |
| Module Loaders | 0.54 | 0 |
| Map + Set + WeakMap + WeakSet | 1 | 1 |
| Proxies | 1 | 1 |
| Symbols | 1 | 1 |
| Subclassable Built-ins | 0.55 | 1 |
| Math + Number + String + Array + Object APIs | 1 | 1 |
| Binary and Octal Literals | 1 | 1 |
| Promises | 1 | 0.96 |
| Tail Calls | 1 | 1 |
| Total | 70% | 94% |
Footnotes:
- No IDE errors, but IntelliSense is incomplete.
- No IDE errors, but IntelliSense is lacking.
- An extra (misplaced) warning appears, though nothing breaks.
- No IntelliSense for loaders.
- IntelliSense issues persist.
- A seemingly buggy warning appears.