[英]IntelliSense for Ajax and JavaScript libraries in Visual Studio
I know about using a -vsdoc.js file for IntelliSense , and the one for jQuery is easy to find. 我知道为IntelliSense使用-vsdoc.js文件,并且很容易找到jQuery的文件。 What other JavaScript, Ajax, and DHTML libraries have them and where can I find those files?
其他JavaScript,Ajax和DHTML库有哪些,我在哪里可以找到这些文件? Also, is there a document which outlines the specifications for -vsdoc.js files?
另外,是否有一个文档概述了-vsdoc.js文件的规范?
An excellent blog posting from Betrand LeRoy on IntelliSense format for JavaScript: The format for JavaScript doc comments . Betrand LeRoy关于JavaScript的IntelliSense格式的精彩博客文章: JavaScript文档评论的格式 。
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. param标记用于描述方法或构造函数的参数。 The param tags should be in the same order as the method or constructor's parameters and have the same names.
param标签的顺序应与方法或构造函数的参数顺序相同,并且名称相同。
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: 值类型 - 描述属性(不应该使用prop的'summary') - 语法:
<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 - 用于描述JavaScript类中的字段 - 语法:
<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: 如何将IntelliSense包含在外部JavaScript文件中,以下语法作为JavaScript文件中的第一行:
<reference path="path/to/the/script/reference.js"
assembly="Assembly.Name" name="ScriptResourceName.js"/>
我写了一篇文章来总结(从调查中)vsdoc的哪些部分用于帮助VS 2010中的Intellisense: http : //www.scottlogic.co.uk/2010/08/vs-2010-vs-doc-and- JavaScript的智能感知/
Some guy built a very nice vsdoc for Google Maps V3 . 有些人为Google Maps V3构建了一个非常好的vsdoc 。 I use it, it works well.
我用它,效果很好。 ;-)
;-)
你可以在这里找到Intellisense for MooTools: http : //code.google.com/p/mootoolsintellisense/downloads/list
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.