{@link}
Syntax
{@link namepath}
{@link namepath|link text}
{@link namepath link text}
{@link URL}
{@link URL|link text}
Overview
{@link} creates a hyperlink inside description text. The link target can be a JSDoc namepath to another documented symbol, or an absolute URL.
{@link}— uses the default link style from the template (typically the name, possibly formatted as code).{@linkcode}— forces code formatting for the link text.{@linkplain}— forces plain text (no code formatting) for the link text.
TSTypeScript Supported
TypeScript supports {@link} for inline hyperlinks to symbols and URLs in JSDoc comments.
Examples
Link to a symbol
/**
* Creates a new {@link User} from the given data.
*/
function createUser(data) {}
Link with custom text
/**
* See the {@link User|user model} for the full schema.
*/
Link to a URL
/**
* See the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API MDN Fetch API} docs.
*/
Link to a nested symbol
/**
* Calls {@link MyClass#myMethod} under the hood.
*/
Force code formatting
/**
* Use {@linkcode Array.prototype.map} to transform the array.
*/
In @see tags
/**
* @see {@link parseCSV}
* @see {@link https://tools.ietf.org/html/rfc4180 RFC 4180}
*/
See also
Official reference: jsdoc.app/tags-inline-link