Visual Studio Intellisense for Backbone.js

Is there a -vsdoc.js file for Backbone.js? If not, is there a possible workaround for intellisense with the javascript Backbone.js library?

+6
source share
2 answers

I do not think there is vsdoc. Could not find it in nuget, and some searches did not call it.

An alternative could be a link to a non-minified version, just like you are referencing a vsdoc file. This could be a list of functions and possibly parameter names.

If you have a good JS tool (many of them are in Extensions Manager), or you have Resharper 6.0, you can go to the function definition or read comments there (the non-minified version has comments, but not in vsdoc format).

Update:

Some common link code to enable intellisense, but not link to the file if you use the nuget package.
http://nuget.org/packages/Backbone.js

  • Link in Razor file (.cshtml)

     @if (false) { <script src="/Scripts/backbone.js" type="text/javascript"></script> } 
  • Link in WebView View Engine (.aspx, .ascx, .master):

     <% if(false) { %> <script src="/Scripts/backbone.js" type="text/javascript"></script> <% } %> 
  • Link in JavaScript file (.js)

     /// <reference path="/Scripts/backbone.js" /> 
+10
source

Adding <reference /> to any unminified .js file will give you autocomplete properties, functions, and parameter names. You will not get a beautiful description, but it's still time / typing.

 /// <reference path="http://documentcloud.github.com/backbone/backbone.js" /> 
+6
source

Source: https://habr.com/ru/post/905957/


All Articles