@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
/**
* 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 = [];
}jsconfig.json for this example
{
"compilerOptions": {
"checkJs": true,
"noEmit": true,
"strict": true,
"target": "es2022",
"module": "nodenext",
"types": []
},
"include": ["*.js"]
} /**
* @see clearCart
* @param {{ lines: string[] }} cart
*/
export function emptyCart(cart) {
cart.lines = [];
}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
@seestable: 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
- TypeScript 4.1: editor support for the JSDoc @see tag · TypeScript release notes
- JSDoc Reference: @see · TypeScript handbook
- @see · JSDoc
Last reviewed 20 October 2026.