Skip to main content

@fires

Syntax​

@fires ClassName#eventName

Overview​

@fires documents which events a function can emit. Link it to an @event doclet using the full event namepath (ClassName#eventName).

Example​

class Connection {
/**
* Open the connection.
* @fires Connection#open
* @fires Connection#error
*/
connect() {
// ...
}
}

/**
* Fired when the connection is established.
* @event Connection#open
*/

/**
* Fired when a connection error occurs.
* @event Connection#error
* @type {Error}
*/

See also​