Exploring the XML javascript comment syntax in Visual Studio and encountering some confusion. Specifically, I have a query regarding custom types. For example, consider a custom type like...
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;
};
If I wish to refer to that type in a <field>
later on, I would write something like...
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');
};
However, despite this setup, Intellisense in Visual Studio provides the description of .CurrentUser
but does not suggest .id
or .name
properties. It behaves as if it's a generic object without any specific type information.
Is there a way to enhance Visual Studio's intelligence to recognize the detailed description of custom objects?