0

I am trying to use the default parameters in the javascript function parameters

  var _BindAddNewPipelineButton = function(pipeId = undefined, enableEditMode = false) {

Its not recognizing proper syntax highlighting and breaking my javascript file.

enter image description here

Please let me know any plugins available to support this kind of highlighting


Cant see the Language Service. Please see screenshot enter image description here

ankur
  • 557
  • 1
  • 10
  • 37
  • You don't have to specify undefined for params if you are not passing it'll be undefined by default. – Rahul Sharma Apr 02 '18 at 10:09
  • ok removed that , now , even false is breaking . like this. var _BindAddNewPipelineButton = function(pipeId, enableEditMode = false) { – ankur Apr 02 '18 at 10:11
  • syntax is correct which browser and version you are using? – Rahul Sharma Apr 02 '18 at 10:12
  • no no , everything is working fine .my syntax is breaking in visual studio editor and hence all my auto indentation and intellisemse support is not working – ankur Apr 02 '18 at 10:25

1 Answers1

0

For VS2015:

Open Tools > Options > Text editor > Node.js > IntelliSense and select the ES6 IntelliSense Preview checkbox.

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

For VS2017:

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.

Javier Pallarés
  • 321
  • 2
  • 10
  • Sorry, I didn't know there wasn't a section for that in VS 2015. See my updated answer and please consider to upvote it if you find it useful. – Javier Pallarés Feb 15 '19 at 14:03