gpt4 book ai didi

node.js - jsdoc3 中事件标签的工作示例

转载 作者:太空宇宙 更新时间:2023-11-03 22:16:48 25 4
gpt4 key购买 nike

有人可以给我一个如何正确使用@event标签的例子吗?

我在这里查看了 jsdoc3 文档: http://usejsdoc.org/tags-event.html但我无法让它工作。

我正在使用nodejs,并且我在 MyClass/index.js 中有一个模块,它通过 MyClass 的名称导出一个构造函数:

module.exports = MyClass;
myClass = function () { ... };

我尝试添加

/**
* Snowball event.
* @event MyClass#snowball
*/

在编译的文档中,snowball 出现在全局事件列表中,但是当我单击它时,它会告诉我

The requested URL /{path-to-my-docs}/MyClass.html was not found on this server.

提前致谢。

最佳答案

这工作正常:

/**
* @class
*/
function Blah() {
}

/**
* @event Blah#something
* @type {Object}
* @property {integer} some_field Represents something or other.
*/

关于node.js - jsdoc3 中事件标签的工作示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25127823/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com