Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Intellisense for Backbone.js

Is there a -vsdoc.js file for Backbone.js? If not, is there a feasible work-around method for intellisense with the Backbone.js javascript library?

like image 731
one.beat.consumer Avatar asked Jan 14 '12 01:01

one.beat.consumer


People also ask

Can you code JavaScript in Visual Studio?

Visual Studio 2022 provides rich support for JavaScript development, both using JavaScript directly, and also using the TypeScript programming language, which was developed to provide a more productive and enjoyable JavaScript development experience, especially when developing projects at scale.

What is IntelliSense JavaScript?

IntelliSense# Visual Studio Code's JavaScript IntelliSense provides intelligent code completion, parameter info, references search, and many other advanced language features. Our JavaScript IntelliSense is powered by the JavaScript language service developed by the TypeScript team.


1 Answers

I don't think there is vsdoc. Couldn't find it in nuget and some searching didn't bring it up.

An alternative might be to reference the non-minified version the same way you reference the vsdoc file. This may you function list and maybe parameter names.

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

Update:

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

  • Reference in Razor file (.cshtml)

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

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

    /// <reference path="/Scripts/backbone.js" />
    
like image 66
Meligy Avatar answered Sep 29 '22 12:09

Meligy