JSDoc tag

@see

  • Documentation only
  • Since TypeScript 4.1

@see names something related to the documented code: another function, a class, a member or a URL. Editors list it in the hover. Since TypeScript 4.1, go to definition works on a name after @see, including dotted names such as models.Cart.

Like {@link}, it is documentation only. An @see that names something that does not exist is not an error, as the second example shows.

At a glance

Use JSDoc in a .js file TypeScript in a .ts file
A related declaration /** @see removeLine */ /** @see removeLine */
With a link and text /** @see {@link removeLine} to undo it */ /** @see {@link removeLine} to undo it */
A web page /** @see https://developer.mozilla.org/ */ /** @see https://developer.mozilla.org/ */

Examples

cart.js TypeScript 5.9.3 TypeScript 5.9.3, run 21 October 2026: No errors. 6.0.3 TypeScript 6.0.3, run 21 October 2026: the same as 5.9.3. No errors. 7.0.2 TypeScript 7.0.2, run 21 October 2026: the same as 5.9.3. No errors. checked 21 October 2026
/**
 * Adds a line to the cart.
 *
 * @see Cart
 * @see {@link removeLine} to undo it
 * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push
 * @param {Cart} cart
 * @param {string} sku
 */
export function addLine(cart, sku) {
  cart.lines.push(sku);
}

/**
 * @see addLine
 * @param {Cart} cart
 * @param {string} sku
 */
export function removeLine(cart, sku) {
  cart.lines = cart.lines.filter((line) => line !== sku);
}

export class Cart {
  /** @type {string[]} */
  lines = [];
}
Pointing readers elsewhere with @see.
jsconfig.json for this example
{
  "compilerOptions": {
    "checkJs": true,
    "noEmit": true,
    "strict": true,
    "target": "es2022",
    "module": "nodenext",
    "types": []
  },
  "include": ["*.js"]
}
cart.js TypeScript 5.9.3 TypeScript 5.9.3, run 21 October 2026: No errors. 6.0.3 TypeScript 6.0.3, run 21 October 2026: the same as 5.9.3. No errors. 7.0.2 TypeScript 7.0.2, run 21 October 2026: the same as 5.9.3. No errors. checked 21 October 2026
/**
 * @see clearCart
 * @param {{ lines: string[] }} cart
 */
export function emptyCart(cart) {
  cart.lines = [];
}
An @see to a name that does not exist is not an error.
jsconfig.json for this example
{
  "compilerOptions": {
    "checkJs": true,
    "noEmit": true,
    "strict": true,
    "target": "es2022",
    "module": "nodenext",
    "types": []
  },
  "include": ["*.js"]
}

Forms

A bare name (@see Cart), a {@link} with text (@see {@link removeLine} to undo it) or a URL. A comment can have several @see lines. We checked with TypeScript's language service that go to definition on a bare @see name lands on the declaration.

Gotchas

  • Keep URLs in @see stable: nothing checks them either.

Questions

What is the difference between @see and {@link}?

@see is a block tag that adds a "see also" entry; {@link} is an inline tag that makes a name in any text clickable. They are often combined: @see {@link Cart}.

Sources

Last reviewed 20 October 2026.