正在关注these guidelines for vsdoc documentation,我一直无法让intellisense为给定类型的数组正常工作。下面是一些演示问题为javascript编写vsdoc格式的T类型数组,我发现了一个Bug?
function MyType() {
/// <summary>Class description here</summary>
/// <field name="PropertyA" type="Boolean">Description of Property A</field>
/// <field name="PropertyB" type="String">Description of Property B</field>
}
MyType.prototype.PropertyA = false;
MyType.prototype.PropertyB = "";
function testFunc(arrayOfMyType) {
/// <summary>Description of testFunc</summary>
/// <param name="arrayOfMyType" type="Array" elementType="MyType">asdfasdf</param>
// right here, I should get the intellisense for an item of type MyType but I don't
arrayOfMyType[0].
}
右arrayOfMyType[0]
后,我应该得到智能感知MyType的,但我不代码。我也尝试了一个for-in循环,看看是否会出现正确的intellisense,但它不会。我应该注意到arrayOfMyType
对Array
确实具有正确的智能感知,并且如果将其从Array
更改为MyType
,那么我会得到正确的智能感知,但不会像MyType
类型的Array
那样在示例中评论。
目前我只能访问sp1 vs2010之前的版本,所以我不确定它是否修补了一个bug。
谁能告诉我,如果
- 我在写我的vsdoc XML注释错误
- 我正确与否对期待得到的MyType智能感知在该行
- 的智能感知上面的代码片段可以在vs2010 sp1中运行
这就是太糟糕了,我得向微软连接,并提出确保为特征/检查,如果其未实现。它也是一个耻辱,因为我有一些非常棒的js intellisense的东西出来,如果这个功能被实现, – 2011-06-13 12:42:03