W3cubDocs

/JSDoc

@override

Table of Contents

Overview

The @override tag indicates that a symbol overrides a symbol with the same name in a parent class.

This tag is provided for compatibility with Closure Compiler. By default, JSDoc automatically identifies symbols that override a parent.

If your JSDoc comment includes the @inheritdoc tag, you do not need to include the @override tag. The presence of the @inheritdoc tag implies the presence of the @override tag.

Example

The following example shows how to indicate that a method overrides a method in its parent class:

Method that overrides a parent
/**
 * @classdesc Abstract class representing a network connection.
 * @class
 */
function Connection() {}

/**
 * Open the connection.
 */
Connection.prototype.open = function() {
    // ...
};


/**
 * @classdesc Class representing a socket connection.
 * @class
 * @augments Connection
 */
function Socket() {}

/**
 * Open the socket.
 * @override
 */
Socket.prototype.open = function() {
    // ...
};

@inheritdoc

© 2011–2017 the contributors to the JSDoc 3 documentation project
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://usejsdoc.org/tags-override.html