【发布时间】:2017-03-04 02:06:48
【问题描述】:
我有一段这样的代码:
//line 0
/**
* Constructor of class Person
* @class
* @constructor
* @param {string} name Name of person
* @param {string} surname Surname of person
* @param {number} age Age of person
*/
function Person(name, surname, age){
this.name = name;
this.surname = surname;
this.age = age;
}
/** Optional for my project, MISSING JSDOC */
Person.prototype = {
//..somethings..
/** MISSING JSDOC */
talk: function(){
//..somethings..
},
/** MISSING JSDOC */
walk: function(){
//..somethings..
},
/** MISSING JSDOC */
foo: function(){
//..somethings..
p.bar();
//..somethings..
}
};
/**
* A shortcut to access to {@link Person} methods' more easly
* @type {Object} p
*/
var p = Person.prototype;
//something else
但我不知道如何评论 .prototype 对象以使用 IntelliSense 查看属性或方法的描述和可能的类型。 我之前尝试过在 StackOverflow 和其他网站上进行搜索,但没有任何帮助。 抱歉英语不好。
【问题讨论】:
标签: javascript visual-studio-code jsdoc