Improve JSDoc comments with cross-references and clarifications (#254)
Key improvements:
- Add `{@link}` cross-references throughout the codebase to make API
documentation navigable and help AI models understand relationships
- Use `{@link module!Export}` syntax for cross-module references
- Add backticks for inline code formatting (`ResizeObserver`, `App`, etc)
- Fix `PostMessageTransport` examples to show required two-argument form
- Clarify `onteardown` callback return type requirement
- Document React hooks cleanup behavior and Strict Mode considerations
- Add tool visibility example for `registerAppTool`
- Add CSP example for `registerAppResource`
- Fix notification direction documentation in `spec.types.ts`
TypeDoc config migrated from `typedoc.json` to `typedoc.config.mjs` to:
- Support custom `@description` block tag
- Add `intentionallyNotExported` for internal types
- Include `src/server/index.ts` entry point
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
978d8e6fff
commit
d48e35d88a
1 changed files with 359 additions and 231 deletions
30
typedoc.config.mjs
Normal file
30
typedoc.config.mjs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { OptionDefaults } from "typedoc";
|
||||
|
||||
/** @type {Partial<import('typedoc').TypeDocOptions>} */
|
||||
const config = {
|
||||
blockTags: [...OptionDefaults.blockTags, "@description"],
|
||||
intentionallyNotExported: ["AppOptions"],
|
||||
projectDocuments: ["docs/quickstart.md"],
|
||||
entryPoints: [
|
||||
"src/server/index.ts",
|
||||
"src/app.ts",
|
||||
"src/react/index.tsx",
|
||||
"src/app-bridge.ts",
|
||||
"src/message-transport.ts",
|
||||
"src/types.ts",
|
||||
],
|
||||
out: "docs/api",
|
||||
gitRevision: "main",
|
||||
excludePrivate: true,
|
||||
excludeInternal: false,
|
||||
categorizeByGroup: true,
|
||||
navigationLinks: {
|
||||
GitHub: "https://github.com/modelcontextprotocol/ext-apps",
|
||||
Specification:
|
||||
"https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/draft/apps.mdx",
|
||||
},
|
||||
readme: "README.md",
|
||||
includeVersion: true,
|
||||
};
|
||||
|
||||
export default config;
|
||||
Loading…
Reference in a new issue