简体   繁体   中英

Need intellisense or autocomplete feature for my own javascript file

Jquery comes with a vsdoc file that help us to get intellisense or autocomplete feature for jquery. if i want to have the same intellisense or autocomplete feature for my own javascript file then what i need to do.....please help. thanks

Comment your code with JSDoc rules, then use this tool to convert it to VSDoc.

http://code.google.com/p/jsdoc-toolkit-vsdoc/

or learn VSdoc:

http://weblogs.asp.net/bleroy/archive/2007/04/23/the-format-for-javascript-doc-comments.aspx

为您的JavaScript创建一个vsdoc文件,并将其包含在项目中与.js文件位于同一位置的文件中。

You don't actually need vsdocs. In my opinion, it's easier to just document your files using the vsdoc instructions . If you then minify and compile your JavaScript files for release using a tool like Google's Closure , comments and vsdoc remarks are automatically removed for you. This eliminates the need to maintain two separate files. You can even set the Closure compiler to run automatically when you build your VS project.

You'll also need to reference your JavaScript files to enable the IntelliSense. Place

/// <reference path="SomeJavaScript.js" />

at the top of each JavaScript file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM