Is it possible to hide certain functions/fields from displaying in javascript intellisense drop down list in Visual Studio 2008? Either by javascript documentaion XML of by naming privates in a certain way?
I’ve seen <private /> in jquery vsdoc file that implies exactly this behaviour, but doesn’t meet my expectations
{
__hiddenField: 0,
/// <private />
increment: function(){
/// <summary>Increments a private variable</summary>
__hiddenField++;
}
}
But since fields can’t contain documentation (because they have no body) they have to be documented at the top. But still doesn’t work:
{
/// <field name="__hiddenField" type="Number" private="true">PRIVATE USE</field>
__hiddenField: 0,
increment: function(){
/// <summary>Increments a private variable</summary>
__hiddenField++;
}
}
Impossible is a perfectly possible answer and will be accepted if you have the knowledge that it’s actually not possible.
I’m not sure about how to hide it from intellisense, but you could always use closures to hide the variable completely, like this:
That creates an anonymous function around your definition, so window.something.increment() will work, and “hiddenField” is truly hidden.