试图熟悉Visual Studio的XML javascript注释语法。我有一个关于类型的具体问题。说我有诸如自定义类型...Javascript /// <field type =?>用于实例化自定义对象
namespace.types.User = function(_id, _name) {
/// <field name="id" type="Number">ID of the user</field>
/// <field name="name" type="String">Name of the user</field>
this.id = _id;
this.name = _name;
};
如果我想以后我会做类似引用在<field>
该类型...
namespace.session = function() {
/// <field name="CurrentUser" type="namespace.types.User">The current User of the session</field>
this.CurrentUser = new namespace.types.User('foo', 'bar');
};
然而,当我做这个Intellisense会告诉我什么.CurrentUser
意味着但是的描述它不会显示任何建议.id
或.name
。换句话说,它就像一个没有其他类型数据的普通对象。
如何获得VS智能来获取更丰富的自定义对象的描述?
看来,VS2012仍然不尊重 评论以覆盖javascript的智能感知。 –
2013-06-07 19:21:12