I copied the documentation right from the jQuery website and put it all into the following stub named
jquery.intellisense.js, shown below:
Then in any script that uses it I can drop in the following comment to reference the stub.
A problem I had with the initial version of this jQuery stub was that I had defined the methods in the jQuery object as static functions. I had the return values defined as the jQuery type, but it was not working when I chained together methods. What I changed to make it work was to define all of the methods within the context of the object prototype where all methods must be defined in order for them to be used within an instance of the object. Now I can do the method chaining with Intellisense support.
An issue that I do not know how to get around is method overloading. In jQuery a method can take various parameters like in C# but there can only be one function name defined at a time, so that seems there can only be one set of Xml Doc for a method. So what I did with this stub was define the most common parameter combinations that would be used.
Using this stub should be useful since I am going to be integrating a lot of ASP.NET AJAX work with jQuery functionality. They compliment each other very well.