Visual Studio + ES6

Submitted by Robert MacLean on Thu, 07/02/2015 - 09:05

JavaScript-Programming-2014I have been asked recently about the ES6 support in VS and I haven’t had a good answer about how much of it is supported right now (i.e. VS 2015 RC) and what is supported. The general feeling from the askers is that VS is far behind in this space, so the only reasonable thing to do is for me to test this and let you know.

Using Luke Hoban’s awesome page on ES6 features gave me a great point to kick off from around the different features. I then tested each feature in VS 2015 RC and also in VS Code (our new lightweight, cross-platform, free IDE) and in the end Visual Studio has 70% implemented and Code has 94% implemented. What does implemented mean though? It means no errors & and the IDE does the right IntelliSense stuff for you. There is on-going work with both IDE’s so this will improve but as a baseline for discussion it is useful.

The way I worked it out is to assign a 1 (works) or zero (doesn’t work) to each feature. In some cases I assigned a middle value because it kinda worked and the footnotes will explain that. The only missing one on here is the reflect API. I don’t have an example I can work with around that yet, so I did not include it. If you find any errors here, please let me know and I will gladly update!

  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:

  1. No issues in the IDE are raised but the IntelliSense is lacking.
  2. No issues in the IDE are raised but the IntelliSense is lacking.
  3. There is an odd issue where an extra warning is raised in the wrong place. It doesn’t break anything but isn’t ideal.
  4. No IntelliSense on the loaders.
  5. Again lack of IntelliSense is the issue.
  6. Weird warning appearing, which looks like a bug.