VS Code Extension · v0.0.3

Jump to the symbol.
Skip the import.

A tiny VS Code extension that makes JSDoc {@link} references work with Go to Definition — without adding throwaway imports just to navigate.

Get it on the Marketplace → View source
$ code --install-extension laststance.go-to-definition-for-jsdoc
src/drawing.ts
1/**
2 * Reads drawing settings from the shared query.
3 * See {@link useCanvasViewportQuery}.
4 */
5export function readDrawingSettings() {
6 // ...
7}
src/hooks/queries.ts
● opened by jump
40
41export function useCanvasViewportQuery() {
42 return useQuery(canvasViewportKey)
43}
F12 Go to Definition
▸ jumped to queries.ts · no import

Documentation shouldn't be dependency wiring

To make a JSDoc link resolve, you can import a type or value purely so TypeScript can see it. That works — but it turns a comment into plumbing, and fights organize-imports and lint rules. This extension lets the comment stay a comment.

The workaround import just to navigate
import type { useCanvasViewportQuery } from './queries'

/**
 * See {@link useCanvasViewportQuery}.
 */
An import added only so navigation works. Auto-organize can strip it; lint can flag it.
With the extension just a comment
/**
 * See {@link useCanvasViewportQuery}.
 */
export function readDrawingSettings() {
  // ...
}
Cursor in the link target → Go to Definition resolves the symbol from your workspace. No import.

Recognizes the link forms you already write

Inline JSDoc links, in every shape — active across TypeScript, TSX, JavaScript, and JSX.

{@link SymbolName}
{@link 'SymbolName'}
{@link "SymbolName"}
{@link Namespace.SymbolName}
{@linkplain SymbolName}
{@linkcode SymbolName}
TypeScript TSX JavaScript JSX

A lookup that stays intentionally simple

01
Exact match first

Ask VS Code's workspace symbol provider for an exact match on the link target.

02
Fall back to the AST

If that misses, scan TypeScript and JavaScript files with the TypeScript AST — handy when the symbol isn't indexed yet.

03
Skip the noise

Ignore generated and dependency folders: node_modules, dist, out, .next, .git.

See the jump in a real editor

SCOPE

What it doesn't try to solve

It doesn't make relative file links native in TypeScript or VS Code — that lives in the long-running language-service discussion. This extension stays on the symbol-navigation side, which keeps it small and predictable.

microsoft/TypeScript#47718 ↗
/** * See {@link ./some-file.ts}. */ # relative file path — out of scope

Keep the good habit low-friction.

Documentation links should be cheap to write. Install it and run Go to Definition inside any supported JSDoc link.

VS Code Marketplace Open VSX GitHub
Share it with a fellow dev
Share on X Share on Bluesky