Visual Studio 2015中对es6(默认参数)的语法支持
我正在尝试使用javascript函数参数中的默认参数
I am trying to use the default parameters in the javascript function parameters
var _BindAddNewPipelineButton = function(pipeId = undefined, enableEditMode = false) {
它无法识别正确的语法高亮并破坏了我的JavaScript文件.
Its not recognizing proper syntax highlighting and breaking my javascript file.
请让我知道任何可用的插件来支持这种突出显示
Please let me know any plugins available to support this kind of highlighting
不能看到语言服务.请看截图
Cant see the Language Service. Please see screenshot
对于VS2015:
打开工具>选项>文本编辑器> Node.js> IntelliSense,然后选择ES6 IntelliSense预览复选框.
Open Tools > Options > Text editor > Node.js > IntelliSense and select the ES6 IntelliSense Preview checkbox.
也许您必须在执行此操作之前先安装TypeScript 1.6: https://github.com/Microsoft/nodejstools/wiki/ES6-IntelliSense-Preview-in-NTVS-1.1
Maybe you will have to install TypeScript 1.6 before doing this: https://github.com/Microsoft/nodejstools/wiki/ES6-IntelliSense-Preview-in-NTVS-1.1
对于VS2017:
您是否已选中启用新的JavaScript语言服务"(选项">文本编辑器">"JavaScript/TypeScript">语言服务")?
Have you checked 'Enable the new JavaScript language service' (Options > Text Editor > JavaScript/TypeScript > Language Service)?
由于性能问题,我一次禁用了此功能,而我也遇到了与您相同的问题.
I disabled this once because of low performance issues and I had the same problem as you.