Extract inline code examples from JSDoc comments into companion
`.examples.ts`/`.examples.tsx` files. Examples are now:
- Type-checked by wrapping them in functions
- Referenced via `{@includeCode ./file.examples.ts#regionName}` tags
- Organized using `//#region` and `//#endregion` markers
This keeps the main source files cleaner while ensuring examples
compile correctly. Updated TypeDoc config with `exampleTag: false`
to support title text on `@example` tags.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
33 lines
887 B
JavaScript
33 lines
887 B
JavaScript
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,
|
|
jsDocCompatibility: {
|
|
exampleTag: 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;
|