VS JavaScript intellisense with paramaters

Posted by TonyB on Stack Overflow See other posts from Stack Overflow or by TonyB
Published on 2008-12-30T00:30:42Z Indexed on 2010/04/16 21:33 UTC
Read the original article Hit count: 133

here is some sample javascript:

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
        //val1. does NOT


    }
}

Shouldn't visual studio be giving me intellisence when i do "val." inside the "doSomething" function? I would expect it to give me field1 and field2 as options, but it doesn't. I DO 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 param comment.

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

© Stack Overflow or respective owner

Related posts about visual-studio-2008

Related posts about JavaScript