I know about using a -vsdoc.js file for IntelliSense, and the one for jQuery is easy to find. What other JavaScript, Ajax, and DHTML libraries have them and where can I find those files? Also, is there a document which outlines the specifications for -vsdoc.js files?
I know about using a -vsdoc.js file for IntelliSense, and the one for jQuery is easy to find. What other JavaScript, Ajax, and DHTML libraries have them and where can I find those files? Also, is there a document which outlines the specifications for -vsdoc.js files?
Share Improve this question edited Jun 6, 2011 at 17:33 Peter Mortensen 31.6k22 gold badges110 silver badges133 bronze badges asked Nov 11, 2008 at 21:03 Anthony PottsAnthony Potts 9,1608 gold badges43 silver badges57 bronze badges4 Answers
Reset to default 13An excellent blog posting from Betrand LeRoy on IntelliSense format for JavaScript: The format for JavaScript doc comments.
In a nutshell:
Summary - used to describe a function/method or event. Syntax:
<summary locid="descriptionID">Description</summary>
Parameter - describe a parameter to a function/method. Syntax:
<param name="parameterName"
mayBeNull="true|false" optional="true|false"
type="ParameterType" parameterArray="true|false"
integer="true|false" domElement="true|false"
elementType="ArrayElementType" elementInteger="true|false"
elementDomElement="true|false"
elementMayBeNull="true|false">Description</param>
The param tag is used to describe the parameters of a method or constructor. The param tags should be in the same order as the method or constructor's parameters and have the same names.
Function return type - syntax:
<returns
type="ValueType" integer="true|false" domElement="true|false"
mayBeNull="true|false" elementType="ArrayElementType"
elementInteger="true|false" elementDomElement="true|false"
elementMayBeNull="true|false">Description</returns>
Value type - describes a property (shouldnt use 'summary' for a prop) - syntax:
<value
type="ValueType" integer="true|false" domElement="true|false"
mayBeNull="true|false" elementType="ArrayElementType"
elementInteger="true|false" elementDomElement="true|false"
elementMayBeNull="true|false"
locid="descriptionID">Description</value>
Field - used to describe a field in a JavaScript class - syntax:
<field name="fieldName" type="FieldType"
integer="true|false" domElement="true|false" mayBeNull="true|false"
elementType="ArrayElementType" elementInteger="true|false"
elementDomElement="true|false" elementMayBeNull="true|false"
locid="descriptionID">Description</field>
How to include IntelliSense for an external JavaScript file, the following syntax as the first line(s) in a JavaScript file:
<reference path="path/to/the/script/reference.js"
assembly="Assembly.Name" name="ScriptResourceName.js"/>
I wrote on article to sum up (from investigation) what parts of vsdoc are used to help Intellisense in VS 2010 : http://www.scottlogic.co.uk/2010/08/vs-2010-vs-doc-and-javascript-intellisense/
You can find Intellisense for MooTools here: http://code.google.com/p/mootoolsintellisense/downloads/list
Some guy built a very nice vsdoc for Google Maps V3. I use it, it works well. ;-)