VS2012 javascript intellisense字段描述

时间:2014-06-16 15:40:30

标签: javascript visual-studio-2012 intellisense

有没有办法为属性启用字段xml标记描述?示例代码:

function MyObj() {
    /// <field name='num' type='int'>integer field</field>
    this.num = 5;
}

然后,如果我执行以下操作:

image of intellisense

我没有看到描述&#34;整数字段&#34;我指定了。

这是某个禁用选项吗?或者只是一个bug? javascript intellisense的文档并不是非常简单:(

编辑:应该注意我已经安装了resharper。

1 个答案:

答案 0 :(得分:1)

尝试类似:

  function getArea(radius)
  {
      /// <summary>Determines the area of a circle that has the specified radius parameter.</summary>
      /// <param name="radius" type="Number">The radius of the circle.</param>
      /// <returns type="Number">The area.</returns>
      var areaVal;
      areaVal = Math.PI * radius * radius;
      return areaVal;
  }

在你的情况下:

function MyObj() {
     /// <field name='HorsePower' type='Number'>integer field</field>
    this.num = 5;
}

来自MSDN Docs

如果不起作用使用“选项”对话框的“智能感知”页面将扩展名添加为参考组。您可以通过选择菜单栏上的工具选项,然后选择文本编辑器 JavaScript ,智能感知参考

These MSDN Docs

中对此进行了解释