JSDoc 中文网

Synonyms

语法

¥Syntax

@fires <className>#[event:]<eventName>

概述

¥Overview

@fires 标记指示方法在调用时可以触发指定类型的事件。使用 @event tag 记录事件的内容。

¥The @fires tag indicates that a method can fire a specified type of event when it is called. Use the @event tag to document the event's content.

示例

¥Examples

触发 'drain' 事件的方法
/**

 * Drink the milkshake.

 *  * @fires Milkshake#drain
 */
Milkshake.prototype.drink = function() {
    // ...
};