VS JavaScript intellisense with parameters

here are some javascript examples:

SomeObjectType = function() {
}

SomeObjectType.prototype = {
    field1: null,
    field2: null
}

SomeOtherObject = function() {
}

SomeOtherObject.prototype =
{
    doSomething: function(val) {
        /// <param name="val" type="SomeObjectType"></param>
        var val2 = new SomeObjectType();
        //val2. shows intellisense correctly
        //val. does NOT


    }
}

      

If visual studio doesn't give me intelligence when I do "val". inside doSomething function? I would have expected this to give me field1 and field2 as options, but it doesn't. I will get field1 and field2 if I type "val2". so intellisence works when I create a new object of the same type that I specify in the parameter comment.

Any ideas what I am doing wrong or is this just not supported?

0


source to share


2 answers


This is not supported in VS 2008. It will be supported in the next version.



In VS 2008, XML comments are only used to create tooltip information. And I think tooltips can only be supported in referenced files.

+2


source


This is supported on VS2010. But why only for prototypes ?:(



0


source







All Articles