10 ES6 IntelliSense Preview in NTVS 1.1
Paul van Brenk редактировал(а) эту страницу 2017-12-12 12:51:01 -08:00
Этот файл содержит неоднозначные символы Юникода!

Этот файл содержит неоднозначные символы Юникода, которые могут быть перепутаны с другими в текущей локали. Если это намеренно, можете спокойно проигнорировать это предупреждение. Используйте кнопку Экранировать, чтобы подсветить эти символы.

🎵Note: This documentation is outdated at this point, especially when using the Node tools in Visual Studio 2017. We're working on update docs, and will redirect you to those when they're ready.

Youve been asking for ES6 support in Node.js tools for Visual Studio and were excited to give you a sneak peek in NTVS 1.1 RC2!

NTVS is in the process of combining forces with the JavaScript and TypeScript teams to reduce duplication of effort and provide a more consistent editing experience throughout Visual Studio. In particular, we are experimenting with replacing our current JavaScript editor, a homegrown Node.js static analysis engine, with a new JavaScript editing experience powered by TypeScript. In this way we can take advantage of TypeScripts robust ES6 language support as well as other exciting features that are coming down the pipeline.

Enabling the ES6 IntelliSense Preview

Step 1: Install TypeScript 1.6+

This option will only be enabled if TypeScript 1.6 is installed for VS 2013 or VS 2015, currently available for download.

🎵 Note: TypeScript 1.8 is now required for preview releases.

Step 2: Select the "ES6 IntelliSense Preview" Option

To preview this new experience select the “ES6 IntelliSense Preview” option* found in Visual Studio under: Tools > Options > Text Editor > Node.js > IntelliSense

image

Step 3: Close any open JavaScript files

After selecting this option you'll need to close and reopen any JavaScript files that were being edited before it will take effect.

How it works

Our new “ES6 IntelliSense Preview” JavaScript editing experience can take advantage of TypeScript definition files to provide better IntelliSense for the most popular Node.js frameworks, such as Commander, Express, jQuery and Knockout. When using an external JavaScript library, or new host API, you'll want to reference a definition file (.d.ts) to describe the shape of that library. Definitely Typed is a convenient repository on GitHub that has a number of definition files for some of the most popular JavaScript libraries, including one for Node.js. Find out more about using existing definition files or writing your own.

Learn more

A list of ES6 features that are supported by TypeScript 1.6 can be found on the TypeScript roadmap.

Send Feedback

This new IntelliSense experience is very much experimental, so love it? Hate it? Ambivalent? Hungry? Please, please, please let us know what you think!