Visual Studio中的IntelliSense for Ajax和JavaScript库 [英] IntelliSense for Ajax and JavaScript libraries in Visual Studio

查看:74
本文介绍了Visual Studio中的IntelliSense for Ajax和JavaScript库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道将-vsdoc.js文件用于 IntelliSense ,对于jQuery很容易找到.还有哪些其他JavaScript,Ajax和DHTML库,在哪里可以找到这些文件?另外,是否有文档概述-vsdoc.js文件的规范?

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?

推荐答案

Betrand LeRoy撰写的关于JavaScript的IntelliSense格式的优秀博客文章: JavaScript文档注释的格式 .

An excellent blog posting from Betrand LeRoy on IntelliSense format for JavaScript: The format for JavaScript doc comments.

简而言之:

摘要-用于描述函数/方法或事件.语法:

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>

param标记用于描述方法或构造函数的参数. 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.

函数返回类型-语法:

<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>

值类型-描述属性(不应该在道具中使用'summary')-语法:

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-用于描述JavaScript类中的字段-语法:

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>

如何将IntelliSense包含在外部JavaScript文件中,以下语法作为JavaScript文件的第一行:

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"/>

这篇关于Visual Studio中的IntelliSense for Ajax和JavaScript库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆