VS智能感知的JavaScript与PARAMATERS
问题描述:
这里是一些样品的javascript:VS智能感知的JavaScript与PARAMATERS
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
}
}
不宜视觉工作室是给我的,当我做intellisence “VAL”。在“doSomething”函数里面?我希望它给我field1和field2作为选项,但它不。如果输入“val2”,我会得到field1和field2。所以当我创建一个与我在param注释中指定的相同类型的新对象时,intellisence将起作用。
任何想法,我在做什么错或是这只是不支持?
答
这在VS 2008中不受支持。它将在下一个版本中得到支持。
在VS 2008中,XML注释仅用于生成工具提示信息。我认为这些工具提示只能在引用的文件中被支持。
答
这在VS2010上受支持。但为什么只用于原型方法? :(