import { ApiModel, ApiItem } from '@microsoft/api-extractor-model'; import { DocumenterConfig } from './DocumenterConfig'; /** * Renders API documentation in the Markdown file format. * For more info: https://en.wikipedia.org/wiki/Markdown */ export declare class MarkdownDocumenter { private readonly _apiModel; private readonly _documenterConfig; private readonly _tsdocConfiguration; private readonly _markdownEmitter; private _outputFolder; private readonly _pluginLoader; private readonly _uriRoot; private readonly rootHeadingLevel; constructor(apiModel: ApiModel, documenterConfig: DocumenterConfig | undefined); generateFiles(outputFolder: string): void; /** * Writes complete suite of documentation for all packages in the model. * Corresponds with {@link DocGenMode.Full}. */ private _writeFullOutput; /** * Generates simple package summary documents for each package, writing each to file. * Corresponds with {@link DocGenMode.PackageSummaries}. */ private _writeSimplePackageSummaries; /** * Generates a simple package summary for the provided package overview, and writes it to file. * This summary is a very truncated view of the package's documentation, only including the package's * `summary` and `remarks` (including examples) blocks. * @param apiPackage - Package for which the summary document will be generated */ private _writeSimplePackageSummary; /** * Writes the provided API item to a new page file. */ private _writeApiItemToNewPage; /** * Writes the provided API item to the provided documentation `output`. * Note: this does not generate a file. It assumes that the `output` being rendered to will be handled * by the consumer. */ private _writeApiItemToExistingOutput; /** * Writes the specified `apiItem` and its built-up `output` to file * @param apiItem - The API member for which documentation is being generated * @param output - Existing documentation output for the `apiItem` * @param options - See {@link FileRenderOptions} */ private _writeOutputToFile; private _writeHeritageTypes; /** * Renders contents for any `@remarks` and `@examples` comments. */ private _writeRemarksSection; private _writeThrowsSection; /** * GENERATE PAGE: MODEL */ private _writeModelTable; /** * GENERATE PAGE: PACKAGE or NAMESPACE */ private _writePackageOrNamespaceTables; /** * GENERATE PAGE: CLASS */ private _writeClassTables; /** * GENERATE PAGE: ENUM */ private _writeEnumTables; /** * GENERATE PAGE: INTERFACE */ private _writeInterfaceTables; /** * GENERATE PAGE: FUNCTION-LIKE */ private _writeFunctionTables; private _writeParametersSection; private _writeReturnsSection; private _createParagraphForTypeExcerpt; /** * Appends any reference tokens in the given `excerpt` to the provided `docNodeContainer` as hyperlinks, * comma-separated. * * @returns whether or not any contents were appended. */ private _appendExcerptWithHyperlinks; private _appendTypeParams; private _createTitleCell; /** * This generates a DocTableCell for an ApiItem including the summary section and "(BETA)" annotation. * * @remarks * We mostly assume that the input is an ApiDocumentedItem, but it's easier to perform this as a runtime * check than to have each caller perform a type cast. */ private _createDescriptionCell; private _createModifiersCell; private _createPropertyTypeCell; private _writeFrontMatter; private _writeBreadcrumb; private _writeBetaWarning; private _appendSection; private _appendAndMergeSection; /** * Adjusts the name of the item as needed. * Accounts for method overloads by adding a suffix such as "MyClass.myMethod_2". */ private _getQualifiedApiItemName; /** * Gets the nearest ancestor of the provided item that will have its own rendered page. * This can be useful for determining the file path the item will ultimately be rendered under, * as well as for generating links. */ private getFirstAncestorWithOwnPage; /** * Gets the file path for the specified API item. * In the case of an item that does not get rendered to its own page, this will point to the page * of the ancestor item under which the provided item will be rendered. * * Will return undefined if the item is not directly rendered * (i.e. {@link ApiItemKind.Model} and {@link ApiItemKind.EntryPoint}). * * @internal */ _getFilePathForApiItem(apiItem: ApiItem): string | undefined; /** * Gets the heading ID (if any) for the specified API item. * Will return undefined if the item corresponds to the root of a page, or if the item is one that does * not result in any rendered contents (i.e. Model and EntryPoint). * * @internal */ _htmlIDForItem(apiItem: ApiItem): string | undefined; /** * Generates the fully qualified url for the specified API item. * * @internal */ _getLinkForApiItem(apiItem: ApiItem): string; /** * Gets the appropriate heading level for the specified API item. * This is calculated based on the depth of the item relative to the page on which it's being rendered. * * @param apiItem - The item for which the level is being calculated. * @param levelOffset - An offset to apply to the generated value. Must be an integer. * * @internal */ _getHeadingLevelForApiItem(apiItem: ApiItem, levelOffset: number): number; private _deleteOldOutputFiles; /** * Policy for deciding if an API item should get a dedicated page rendered for it (true), * or if its contents should be rendered directly within the parent item's page (false). */ private _shouldHaveStandalonePage; private _isAllowedPackage; } //# sourceMappingURL=MarkdownDocumenter.d.ts.map