Visual Studio uses commented XML-like markup to build javascript intellisense.
Basically, you add markup of this form (say this code is in myScript.js
):
function myFeature (enable) {
/// <summary>Summary of the function</summary>
/// <param name='enable' type='Boolean'>True: RW, False: RO</param>
[function code here]
}
In this example, you can see the parameter enable
is declared as a boolean, you will get intellisense accordingly.
There are numerous tags you can use: <summary>
, <param>
, <field>
, etc.
You can find documentation on MSDN.
To access this intellisense from another script file, you will need to add a reference as Dean.DePue said (/// <reference path="~/Scripts/myScript.js" />
).
Now back to your problem
DataTable does not provide in its script file markup to describe to visual studio how things work inside of it. Visual Studio is still able to get the functions available, but no additional info is found.
Note that you can also provide this markup in a separate file (often called a vsdoc file). It allows for us to embed minified files but still get the intellisense by using the // <reference>
that points to the vsdoc file.
To sum it up
DataTable does not provide intellisense info (and does not have a separate vsdoc file), that is why you don't get anything.
As per the animate
function, the first parameter is declared as type=Object
, so it can be any object without further detail.