Skip to content
On this page

@fires ​

Describe the events this method may fire.

Synonyms ​

  • emits

Syntax ​

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

Overview ​

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 ​

Method that fires a 'drain' event

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