Each of these areas was chosen based on feedback we heard on UserVoice, through social media, via the send-a-smile/frown feature in Visual Studio, and from many direct discussions we’ve had with developers like you.
AngularJS 1.x and RequireJS support
By default, Visual Studio 2015 supports the very popular AngularJS and RequireJS libraries. Previously on this blog we’ve discussed the setup required when using Visual Studio 2013 with both of these libraries (using AngularJS in VS, using RequireJS in VS). In Visual Studio 2015, the support is baked in, with no additional setup steps required.
Whenever you reference the angular.js (or angular.min.js) library in your code, editor automatically provides IntelliSense, Go to Definition, and navigation bar support:
IntelliSense support for Angular 1.3, showing suggestions for the routeProvider service
Similarly, RequireJS IntelliSense and navigation support are automatically enabled when you bring in the require.js library. To customize RequireJS support, see Customizing IntelliSense in RequireJS.
IntelliSense suggestions for a module referenced using RequireJS
JSDoc documentation comments
JSDoc comments displayed in IntelliSense tool tips
Documenting configuration objects using JSDoc
In addition to JSDoc comments, XML-style documentation comments continue to be supported as they were in Visual Studio 2013. A full list of the JSDoc tags supported by the editor may be found on MSDN.
New language and browser features
ECMAScript 2015 (formerly ECMAScript 6) support
- Arrow functions (also known as lambdas)
- Template strings
- Rest/spread operators
- Object literal enhancements
- New ES2015 APIs such as Map, Set, Weakmap, Weakset, Promises, and a variety of other API changes
This allows you to now write code such as the following:
Using new language features in ES2015
You may have noticed that some ES2015 features aren’t supported yet, such as modules. We’ve heard from you that support for the latest ES2015 language features is important and we’re looking to support the full ES2015 specification as soon as possible.
IntelliSense for new web browser APIs
Visual Studio 2015 also provides IntelliSense support for new web browser APIs available in Microsoft Edge. Here are a few API highlights:
You can see a full list of APIs supported by visiting the http://status.modern.ie website and filtering to APIs available in the preview release.
You can use the Visual Studio task list to keep track of // TODO, // HACK, // UNDONE, or custom comment tokens in your source. This can help to surface technical debt and possible issues in your code.
In the following example you can see how the editor understands ECMAScript 5 source:
And in another example, you can see that the navigation bar supports the new ES2015 class keyword (which greatly simplifies the equivalent prototype syntax in the previous example):