Skip to main content

@alias

Syntax

@alias aliasName

Overview

@alias tells JSDoc to use the given name as the canonical name for a symbol, regardless of what name it was assigned in the source. This is useful when a symbol is created under one name but exported or known under another.

Example

var utils = {};

(function () {
/**
* Trim whitespace from both ends of a string.
* @alias utils.trim
* @param {string} str
* @returns {string}
*/
function trim(str) {
return str.trim();
}

utils.trim = trim;
}());

In the documentation, trim is documented as utils.trim.

See also

Official reference: jsdoc.app/tags-alias