Skip to content

Add code reference links and backticks to JSDoc comments#1484

Open
jonathanhefner wants to merge 2 commits intomodelcontextprotocol:mainfrom
jonathanhefner:jsdoc-links-and-backticks
Open

Add code reference links and backticks to JSDoc comments#1484
jonathanhefner wants to merge 2 commits intomodelcontextprotocol:mainfrom
jonathanhefner:jsdoc-links-and-backticks

Conversation

@jonathanhefner
Copy link
Member

@jonathanhefner jonathanhefner commented Feb 5, 2026

This PR contains 2 somewhat overlapping commits which add the following to JSDoc comments across the code base:

  1. {@linkcode} tags to cross-link code references, both for ease of reference and to catch docs drift (via pnpm run docs:check)
  2. Backticks for better formatting and semantic understanding of non-linkable code references.

The diff is somewhat large, but essentially uniform. The additional lines (404 lines vs 414 lines) are due to extra import statements and // eslint-disable-next-line @typescript-eslint/no-unused-vars comments to allow TypeDoc to reference previously-unimported types in some {@linkcode} tags (i.e., the imports are used by TypeDoc, but eslint doesn't recognize that).

@jonathanhefner jonathanhefner requested a review from a team as a code owner February 5, 2026 17:32
@changeset-bot
Copy link

changeset-bot bot commented Feb 5, 2026

⚠️ No Changeset found

Latest commit: 3e75363

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 5, 2026

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/client@1484

@modelcontextprotocol/server

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server@1484

@modelcontextprotocol/express

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/express@1484

@modelcontextprotocol/hono

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/hono@1484

@modelcontextprotocol/node

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/node@1484

commit: 3e75363

jonathanhefner and others added 2 commits February 5, 2026 16:42
Replace plain text and backtick-quoted symbol references in JSDoc
comments with proper `{@linkcode}` tags for TypeDoc. This makes class
names, function names, and other symbols clickable in the generated API
documentation.

Also adds type-only imports with ESLint disable comments for symbols
that are only referenced in JSDoc `{@link}` tags.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Wrap code identifiers in backticks throughout JSDoc documentation for
consistency. This includes parameter names, variable names, HTTP
headers, OAuth grant types, URL paths, and string literals.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jonathanhefner jonathanhefner force-pushed the jsdoc-links-and-backticks branch from 067ff0a to 3e75363 Compare February 5, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant