根据How to document ECMA6 classes with JSDoc?定义一个类:
/**
* Class representing some action
*/
class someActionClass {}
现在我该如何定义它的实例?可能如下:
/**
* <WHAT GOES HERE?>
*/
someAction = new someActionClass();
答案 0 :(得分:0)
可以使用@type
tag指定变量类型:
/**
* @type {someActionClass}
*/
var someAction = new someActionClass();