Javascript中的Visual Studio和XML注释使“公共”方法在智能感知中消失

Visual Studio and XML Commenting in Javascript makes "public" methods disappear in intellisense

本文关键字:方法 智能 感知 消失 公共 Studio Visual 中的 XML 注释 Javascript      更新时间:2023-09-26

我很高兴地发现我可以在我的JavaScript中使用XML注释(即):

/// <summary>Determines the area of a circle based on a radius parameter.</summary>
/// <param name="Name" type="String">Give this dude a NAME!</param>
/// <returns type="Nothing">The area.</returns>

直到我意识到在我这样做之后,我的"公共"方法不再列在智能感知中...... :-(

 this.greet = function (greeting) {
        alert(greeting + " " + this);
    } 

当我实例化var thePlayer = new player('bob')时,上面会显示出来;播放器。<--问候将被列出,直到我加入上面的XML注释。

有没有人对此有任何经验和解决方法? 能够将javascript注释到智能感知中将是非常好的!

我认为

如果您从返回中删除(type="Nothing"),它应该显示播放器上的成员。