UNPKG

typedoc-plugin-markdown

Version:

A TypeDoc plugin that generates TypeScript API documentation as Markdown.

52 lines (51 loc) • 2.36 kB
import { BaseRouter, PageDefinition, ProjectReflection, Reflection, ReflectionKind, RouterTarget } from 'typedoc'; export declare abstract class MarkdownRouter extends BaseRouter { extension: string; outputFileStrategy: "members" | "modules"; entryModule: string; ignoreScopes: boolean; modulesFileName: string; entryFileName: string; isPackages: boolean; membersWithOwnFile: ("Enum" | "Variable" | "Function" | "Class" | "Interface" | "TypeAlias")[]; mergeReadme: boolean; anchorPrefix: string; parametersFormat: "list" | "table" | "htmlTable" | "none"; directories: Map<ReflectionKind, string>; kindsToString: Map<ReflectionKind, string>; tableAnchorRules: { targetKind: ReflectionKind; parentKind: number; option: string; }[]; buildPages(project: ProjectReflection): PageDefinition<RouterTarget>[]; /** * This is essentially a copy of the BaseRouter implementation, but adjusted to * generate anchors in a way that is compatible with markdown links. */ protected buildAnchors(target: RouterTarget, pageTarget: RouterTarget): void; /** * Whether a type parameter is slugged from its bare name rather than its * qualified path. In list format its anchor is its heading, which renderers * slug from the bare name, so the router must match it; table anchors follow * the same rule so both formats name a type parameter alike. * * The module and member routers anchor a member twice: first relative to the * page, then relative to its parent, and only the second anchor is kept. The * bare name is therefore used only when the owner of the type parameter (past * its signature and method) is `pageTarget`; a bare slug in the first pass * would push the kept anchor to `-1`. */ private isSluggedByName; private isTableAnchor; private parseChildPages; getIdealBaseNameFlattened(reflection: Reflection): string; getReflectionAlias(reflection: Reflection): string; /** * Whether the reflection is the module named by the (deprecated) * "entryModule" option. Only modules match, so a function or class sharing * the name keeps its own page. */ isEntryModule(reflection: Reflection): boolean; getModulesFileName(reflection: Reflection): string; }