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AED,IAAI,QAAQ,GAAW,EAAE,CAAC;QAC1B,KAAK,MAAM,aAAa,IAAI,OAAO,CAAC,YAAY,EAAE,EAAE;YAClD,qEAAqE;YACrE,IAAI,aAAa,GAAW,qBAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;YACxF,IAAI,2CAAqB,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE;gBACtD,IAAI,aAAa,CAAC,aAAa,GAAG,CAAC,EAAE;oBACnC,0EAA0E;oBAC1E,0DAA0D;oBAC1D,aAAa,IAAI,IAAI,aAAa,CAAC,aAAa,GAAG,CAAC,EAAE,CAAC;iBACxD;aACF;YAED,QAAQ,aAAa,CAAC,IAAI,EAAE;gBAC1B,KAAK,iCAAW,CAAC,KAAK,CAAC;gBACvB,KAAK,iCAAW,CAAC,UAAU,CAAC;gBAC5B,KAAK,iCAAW,CAAC,UAAU;oBACzB,MAAM;gBACR,KAAK,iCAAW,CAAC,OAAO;oBACtB,QAAQ,GAAG,qBAAS,CAAC,sBAAsB,CAAC,+BAAW,CAAC,eAAe,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;oBACpG,MAAM;gBACR;oBACE,QAAQ,IAAI,GAAG,GAAG,aAAa,CAAC;aACnC;SACF;QACD,OAAO,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;IAEO,0BAA0B,CAAC,OAAgB;QACjD,OAAO,IAAI,GAAG,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC;IAEO,qBAAqB;QAC3B,OAAO,CAAC,GAAG,CAAC,2BAA2B,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;QAC9D,8BAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACnD,CAAC;CACF;AAlrCD,gDAkrCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as path from 'path';\nimport { PackageName, FileSystem, NewlineKind } from '@rushstack/node-core-library';\nimport {\n DocSection,\n DocPlainText,\n DocLinkTag,\n type TSDocConfiguration,\n StringBuilder,\n DocNodeKind,\n DocParagraph,\n DocCodeSpan,\n DocFencedCode,\n StandardTags,\n type DocBlock,\n type DocComment,\n type DocNodeContainer\n} from '@microsoft/tsdoc';\nimport {\n type ApiModel,\n type ApiItem,\n type ApiEnum,\n type ApiPackage,\n ApiItemKind,\n ApiReleaseTagMixin,\n ApiDocumentedItem,\n ApiClass,\n ReleaseTag,\n ApiStaticMixin,\n ApiPropertyItem,\n ApiInterface,\n type Excerpt,\n ApiAbstractMixin,\n ApiParameterListMixin,\n ApiReturnTypeMixin,\n ApiDeclaredItem,\n type ApiNamespace,\n ExcerptTokenKind,\n type IResolveDeclarationReferenceResult,\n ApiTypeAlias,\n type ExcerptToken,\n ApiOptionalMixin,\n ApiInitializerMixin,\n ApiProtectedMixin,\n ApiReadonlyMixin,\n type IFindApiItemsResult\n} from '@microsoft/api-extractor-model';\n\nimport { CustomDocNodes } from '../nodes/CustomDocNodeKind';\nimport { DocHeading } from '../nodes/DocHeading';\nimport { DocTable } from '../nodes/DocTable';\nimport { DocEmphasisSpan } from '../nodes/DocEmphasisSpan';\nimport { DocTableRow } from '../nodes/DocTableRow';\nimport { DocTableCell } from '../nodes/DocTableCell';\nimport { DocNoteBox } from '../nodes/DocNoteBox';\nimport { Utilities } from '../utils/Utilities';\nimport { CustomMarkdownEmitter } from '../markdown/CustomMarkdownEmitter';\nimport { PluginLoader } from '../plugin/PluginLoader';\nimport {\n type IMarkdownDocumenterFeatureOnBeforeWritePageArgs,\n MarkdownDocumenterFeatureContext\n} from '../plugin/MarkdownDocumenterFeature';\nimport type { DocumenterConfig } from './DocumenterConfig';\nimport { MarkdownDocumenterAccessor } from '../plugin/MarkdownDocumenterAccessor';\n\nexport interface IMarkdownDocumenterOptions {\n apiModel: ApiModel;\n documenterConfig: DocumenterConfig | undefined;\n outputFolder: string;\n}\n\n/**\n * Renders API documentation in the Markdown file format.\n * For more info: https://en.wikipedia.org/wiki/Markdown\n */\nexport class MarkdownDocumenter {\n private readonly _apiModel: ApiModel;\n private readonly _documenterConfig: DocumenterConfig | undefined;\n private readonly _tsdocConfiguration: TSDocConfiguration;\n private readonly _markdownEmitter: CustomMarkdownEmitter;\n private readonly _outputFolder: string;\n private readonly _pluginLoader: PluginLoader;\n\n public constructor(options: IMarkdownDocumenterOptions) {\n this._apiModel = options.apiModel;\n this._documenterConfig = options.documenterConfig;\n this._outputFolder = options.outputFolder;\n this._tsdocConfiguration = CustomDocNodes.configuration;\n this._markdownEmitter = new CustomMarkdownEmitter(this._apiModel);\n\n this._pluginLoader = new PluginLoader();\n }\n\n public generateFiles(): void {\n if (this._documenterConfig) {\n this._pluginLoader.load(this._documenterConfig, () => {\n return new MarkdownDocumenterFeatureContext({\n apiModel: this._apiModel,\n outputFolder: this._outputFolder,\n documenter: new MarkdownDocumenterAccessor({\n getLinkForApiItem: (apiItem: ApiItem) => {\n return this._getLinkFilenameForApiItem(apiItem);\n }\n })\n });\n });\n }\n\n console.log();\n this._deleteOldOutputFiles();\n\n this._writeApiItemPage(this._apiModel);\n\n if (this._pluginLoader.markdownDocumenterFeature) {\n this._pluginLoader.markdownDocumenterFeature.onFinished({});\n }\n }\n\n private _writeApiItemPage(apiItem: ApiItem): void {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n const output: DocSection = new DocSection({ configuration });\n\n this._writeBreadcrumb(output, apiItem);\n\n const scopedName: string = apiItem.getScopedNameWithinPackage();\n\n switch (apiItem.kind) {\n case ApiItemKind.Class:\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} class` }));\n break;\n case ApiItemKind.Enum:\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} enum` }));\n break;\n case ApiItemKind.Interface:\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} interface` }));\n break;\n case ApiItemKind.Constructor:\n case ApiItemKind.ConstructSignature:\n output.appendNode(new DocHeading({ configuration, title: scopedName }));\n break;\n case ApiItemKind.Method:\n case ApiItemKind.MethodSignature:\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} method` }));\n break;\n case ApiItemKind.Function:\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} function` }));\n break;\n case ApiItemKind.Model:\n output.appendNode(new DocHeading({ configuration, title: `API Reference` }));\n break;\n case ApiItemKind.Namespace:\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} namespace` }));\n break;\n case ApiItemKind.Package:\n console.log(`Writing ${apiItem.displayName} package`);\n const unscopedPackageName: string = PackageName.getUnscopedName(apiItem.displayName);\n output.appendNode(new DocHeading({ configuration, title: `${unscopedPackageName} package` }));\n break;\n case ApiItemKind.Property:\n case ApiItemKind.PropertySignature:\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} property` }));\n break;\n case ApiItemKind.TypeAlias:\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} type` }));\n break;\n case ApiItemKind.Variable:\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} variable` }));\n break;\n default:\n throw new Error('Unsupported API item kind: ' + apiItem.kind);\n }\n\n if (ApiReleaseTagMixin.isBaseClassOf(apiItem)) {\n if (apiItem.releaseTag === ReleaseTag.Alpha) {\n this._writeAlphaWarning(output);\n } else if (apiItem.releaseTag === ReleaseTag.Beta) {\n this._writeBetaWarning(output);\n }\n }\n\n const decoratorBlocks: DocBlock[] = [];\n\n if (apiItem instanceof ApiDocumentedItem) {\n const tsdocComment: DocComment | undefined = apiItem.tsdocComment;\n\n if (tsdocComment) {\n decoratorBlocks.push(\n ...tsdocComment.customBlocks.filter(\n (block) => block.blockTag.tagNameWithUpperCase === StandardTags.decorator.tagNameWithUpperCase\n )\n );\n\n if (tsdocComment.deprecatedBlock) {\n output.appendNode(\n new DocNoteBox({ configuration }, [\n new DocParagraph({ configuration }, [\n new DocPlainText({\n configuration,\n text: 'Warning: This API is now obsolete. '\n })\n ]),\n ...tsdocComment.deprecatedBlock.content.nodes\n ])\n );\n }\n\n this._appendSection(output, tsdocComment.summarySection);\n }\n }\n\n if (apiItem instanceof ApiDeclaredItem) {\n if (apiItem.excerpt.text.length > 0) {\n output.appendNode(\n new DocParagraph({ configuration }, [\n new DocEmphasisSpan({ configuration, bold: true }, [\n new DocPlainText({ configuration, text: 'Signature:' })\n ])\n ])\n );\n output.appendNode(\n new DocFencedCode({\n configuration,\n code: apiItem.getExcerptWithModifiers(),\n language: 'typescript'\n })\n );\n }\n\n this._writeHeritageTypes(output, apiItem);\n }\n\n if (decoratorBlocks.length > 0) {\n output.appendNode(\n new DocParagraph({ configuration }, [\n new DocEmphasisSpan({ configuration, bold: true }, [\n new DocPlainText({ configuration, text: 'Decorators:' })\n ])\n ])\n );\n for (const decoratorBlock of decoratorBlocks) {\n output.appendNodes(decoratorBlock.content.nodes);\n }\n }\n\n let appendRemarks: boolean = true;\n switch (apiItem.kind) {\n case ApiItemKind.Class:\n case ApiItemKind.Interface:\n case ApiItemKind.Namespace:\n case ApiItemKind.Package:\n this._writeRemarksSection(output, apiItem);\n appendRemarks = false;\n break;\n }\n\n switch (apiItem.kind) {\n case ApiItemKind.Class:\n this._writeClassTables(output, apiItem as ApiClass);\n break;\n case ApiItemKind.Enum:\n this._writeEnumTables(output, apiItem as ApiEnum);\n break;\n case ApiItemKind.Interface:\n this._writeInterfaceTables(output, apiItem as ApiInterface);\n break;\n case ApiItemKind.Constructor:\n case ApiItemKind.ConstructSignature:\n case ApiItemKind.Method:\n case ApiItemKind.MethodSignature:\n case ApiItemKind.Function:\n this._writeParameterTables(output, apiItem as ApiParameterListMixin);\n this._writeThrowsSection(output, apiItem);\n break;\n case ApiItemKind.Namespace:\n this._writePackageOrNamespaceTables(output, apiItem as ApiNamespace);\n break;\n case ApiItemKind.Model:\n this._writeModelTable(output, apiItem as ApiModel);\n break;\n case ApiItemKind.Package:\n this._writePackageOrNamespaceTables(output, apiItem as ApiPackage);\n break;\n case ApiItemKind.Property:\n case ApiItemKind.PropertySignature:\n break;\n case ApiItemKind.TypeAlias:\n break;\n case ApiItemKind.Variable:\n break;\n default:\n throw new Error('Unsupported API item kind: ' + apiItem.kind);\n }\n\n if (appendRemarks) {\n this._writeRemarksSection(output, apiItem);\n }\n\n const filename: string = path.join(this._outputFolder, this._getFilenameForApiItem(apiItem));\n const stringBuilder: StringBuilder = new StringBuilder();\n\n stringBuilder.append(\n '<!-- Do not edit this file. It is automatically generated by API Documenter. -->\\n\\n'\n );\n\n this._markdownEmitter.emit(stringBuilder, output, {\n contextApiItem: apiItem,\n onGetFilenameForApiItem: (apiItemForFilename: ApiItem) => {\n return this._getLinkFilenameForApiItem(apiItemForFilename);\n }\n });\n\n let pageContent: string = stringBuilder.toString();\n\n if (this._pluginLoader.markdownDocumenterFeature) {\n // Allow the plugin to customize the pageContent\n const eventArgs: IMarkdownDocumenterFeatureOnBeforeWritePageArgs = {\n apiItem: apiItem,\n outputFilename: filename,\n pageContent: pageContent\n };\n this._pluginLoader.markdownDocumenterFeature.onBeforeWritePage(eventArgs);\n pageContent = eventArgs.pageContent;\n }\n\n FileSystem.writeFile(filename, pageContent, {\n convertLineEndings: this._documenterConfig ? this._documenterConfig.newlineKind : NewlineKind.CrLf\n });\n }\n\n private _writeHeritageTypes(output: DocSection, apiItem: ApiDeclaredItem): void {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n if (apiItem instanceof ApiClass) {\n if (apiItem.extendsType) {\n const extendsParagraph: DocParagraph = new DocParagraph({ configuration }, [\n new DocEmphasisSpan({ configuration, bold: true }, [\n new DocPlainText({ configuration, text: 'Extends: ' })\n ])\n ]);\n this._appendExcerptWithHyperlinks(extendsParagraph, apiItem.extendsType.excerpt);\n output.appendNode(extendsParagraph);\n }\n if (apiItem.implementsTypes.length > 0) {\n const implementsParagraph: DocParagraph = new DocParagraph({ configuration }, [\n new DocEmphasisSpan({ configuration, bold: true }, [\n new DocPlainText({ configuration, text: 'Implements: ' })\n ])\n ]);\n let needsComma: boolean = false;\n for (const implementsType of apiItem.implementsTypes) {\n if (needsComma) {\n implementsParagraph.appendNode(new DocPlainText({ configuration, text: ', ' }));\n }\n this._appendExcerptWithHyperlinks(implementsParagraph, implementsType.excerpt);\n needsComma = true;\n }\n output.appendNode(implementsParagraph);\n }\n }\n\n if (apiItem instanceof ApiInterface) {\n if (apiItem.extendsTypes.length > 0) {\n const extendsParagraph: DocParagraph = new DocParagraph({ configuration }, [\n new DocEmphasisSpan({ configuration, bold: true }, [\n new DocPlainText({ configuration, text: 'Extends: ' })\n ])\n ]);\n let needsComma: boolean = false;\n for (const extendsType of apiItem.extendsTypes) {\n if (needsComma) {\n extendsParagraph.appendNode(new DocPlainText({ configuration, text: ', ' }));\n }\n this._appendExcerptWithHyperlinks(extendsParagraph, extendsType.excerpt);\n needsComma = true;\n }\n output.appendNode(extendsParagraph);\n }\n }\n\n if (apiItem instanceof ApiTypeAlias) {\n const refs: ExcerptToken[] = apiItem.excerptTokens.filter(\n (token) =>\n token.kind === ExcerptTokenKind.Reference &&\n token.canonicalReference &&\n this._apiModel.resolveDeclarationReference(token.canonicalReference, undefined).resolvedApiItem\n );\n if (refs.length > 0) {\n const referencesParagraph: DocParagraph = new DocParagraph({ configuration }, [\n new DocEmphasisSpan({ configuration, bold: true }, [\n new DocPlainText({ configuration, text: 'References: ' })\n ])\n ]);\n let needsComma: boolean = false;\n const visited: Set<string> = new Set();\n for (const ref of refs) {\n if (visited.has(ref.text)) {\n continue;\n }\n visited.add(ref.text);\n\n if (needsComma) {\n referencesParagraph.appendNode(new DocPlainText({ configuration, text: ', ' }));\n }\n\n this._appendExcerptTokenWithHyperlinks(referencesParagraph, ref);\n needsComma = true;\n }\n output.appendNode(referencesParagraph);\n }\n }\n }\n\n private _writeRemarksSection(output: DocSection, apiItem: ApiItem): void {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n if (apiItem instanceof ApiDocumentedItem) {\n const tsdocComment: DocComment | undefined = apiItem.tsdocComment;\n\n if (tsdocComment) {\n // Write the @remarks block\n if (tsdocComment.remarksBlock) {\n output.appendNode(new DocHeading({ configuration, title: 'Remarks' }));\n this._appendSection(output, tsdocComment.remarksBlock.content);\n }\n\n // Write the @example blocks\n const exampleBlocks: DocBlock[] = tsdocComment.customBlocks.filter(\n (x) => x.blockTag.tagNameWithUpperCase === StandardTags.example.tagNameWithUpperCase\n );\n\n let exampleNumber: number = 1;\n for (const exampleBlock of exampleBlocks) {\n const heading: string = exampleBlocks.length > 1 ? `Example ${exampleNumber}` : 'Example';\n\n output.appendNode(new DocHeading({ configuration, title: heading }));\n\n this._appendSection(output, exampleBlock.content);\n\n ++exampleNumber;\n }\n }\n }\n }\n\n private _writeThrowsSection(output: DocSection, apiItem: ApiItem): void {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n if (apiItem instanceof ApiDocumentedItem) {\n const tsdocComment: DocComment | undefined = apiItem.tsdocComment;\n\n if (tsdocComment) {\n // Write the @throws blocks\n const throwsBlocks: DocBlock[] = tsdocComment.customBlocks.filter(\n (x) => x.blockTag.tagNameWithUpperCase === StandardTags.throws.tagNameWithUpperCase\n );\n\n if (throwsBlocks.length > 0) {\n const heading: string = 'Exceptions';\n output.appendNode(new DocHeading({ configuration, title: heading }));\n\n for (const throwsBlock of throwsBlocks) {\n this._appendSection(output, throwsBlock.content);\n }\n }\n }\n }\n }\n\n /**\n * GENERATE PAGE: MODEL\n */\n private _writeModelTable(output: DocSection, apiModel: ApiModel): void {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n const packagesTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Package', 'Description']\n });\n\n for (const apiMember of apiModel.members) {\n const row: DocTableRow = new DocTableRow({ configuration }, [\n this._createTitleCell(apiMember),\n this._createDescriptionCell(apiMember)\n ]);\n\n switch (apiMember.kind) {\n case ApiItemKind.Package:\n packagesTable.addRow(row);\n this._writeApiItemPage(apiMember);\n break;\n }\n }\n\n if (packagesTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Packages' }));\n output.appendNode(packagesTable);\n }\n }\n\n /**\n * GENERATE PAGE: PACKAGE or NAMESPACE\n */\n private _writePackageOrNamespaceTables(output: DocSection, apiContainer: ApiPackage | ApiNamespace): void {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n const abstractClassesTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Abstract Class', 'Description']\n });\n\n const classesTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Class', 'Description']\n });\n\n const enumerationsTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Enumeration', 'Description']\n });\n\n const functionsTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Function', 'Description']\n });\n\n const interfacesTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Interface', 'Description']\n });\n\n const namespacesTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Namespace', 'Description']\n });\n\n const variablesTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Variable', 'Description']\n });\n\n const typeAliasesTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Type Alias', 'Description']\n });\n\n const apiMembers: ReadonlyArray<ApiItem> =\n apiContainer.kind === ApiItemKind.Package\n ? (apiContainer as ApiPackage).entryPoints[0].members\n : (apiContainer as ApiNamespace).members;\n\n for (const apiMember of apiMembers) {\n const row: DocTableRow = new DocTableRow({ configuration }, [\n this._createTitleCell(apiMember),\n this._createDescriptionCell(apiMember)\n ]);\n\n switch (apiMember.kind) {\n case ApiItemKind.Class:\n if (ApiAbstractMixin.isBaseClassOf(apiMember) && apiMember.isAbstract) {\n abstractClassesTable.addRow(row);\n } else {\n classesTable.addRow(row);\n }\n this._writeApiItemPage(apiMember);\n break;\n\n case ApiItemKind.Enum:\n enumerationsTable.addRow(row);\n this._writeApiItemPage(apiMember);\n break;\n\n case ApiItemKind.Interface:\n interfacesTable.addRow(row);\n this._writeApiItemPage(apiMember);\n break;\n\n case ApiItemKind.Namespace:\n namespacesTable.addRow(row);\n this._writeApiItemPage(apiMember);\n break;\n\n case ApiItemKind.Function:\n functionsTable.addRow(row);\n this._writeApiItemPage(apiMember);\n break;\n\n case ApiItemKind.TypeAlias:\n typeAliasesTable.addRow(row);\n this._writeApiItemPage(apiMember);\n break;\n\n case ApiItemKind.Variable:\n variablesTable.addRow(row);\n this._writeApiItemPage(apiMember);\n break;\n }\n }\n\n if (classesTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Classes' }));\n output.appendNode(classesTable);\n }\n\n if (abstractClassesTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Abstract Classes' }));\n output.appendNode(abstractClassesTable);\n }\n\n if (enumerationsTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Enumerations' }));\n output.appendNode(enumerationsTable);\n }\n if (functionsTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Functions' }));\n output.appendNode(functionsTable);\n }\n\n if (interfacesTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Interfaces' }));\n output.appendNode(interfacesTable);\n }\n\n if (namespacesTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Namespaces' }));\n output.appendNode(namespacesTable);\n }\n\n if (variablesTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Variables' }));\n output.appendNode(variablesTable);\n }\n\n if (typeAliasesTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Type Aliases' }));\n output.appendNode(typeAliasesTable);\n }\n }\n\n /**\n * GENERATE PAGE: CLASS\n */\n private _writeClassTables(output: DocSection, apiClass: ApiClass): void {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n const eventsTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Property', 'Modifiers', 'Type', 'Description']\n });\n\n const constructorsTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Constructor', 'Modifiers', 'Description']\n });\n\n const propertiesTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Property', 'Modifiers', 'Type', 'Description']\n });\n\n const methodsTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Method', 'Modifiers', 'Description']\n });\n\n const apiMembers: readonly ApiItem[] = this._getMembersAndWriteIncompleteWarning(apiClass, output);\n for (const apiMember of apiMembers) {\n const isInherited: boolean = apiMember.parent !== apiClass;\n switch (apiMember.kind) {\n case ApiItemKind.Constructor: {\n constructorsTable.addRow(\n new DocTableRow({ configuration }, [\n this._createTitleCell(apiMember),\n this._createModifiersCell(apiMember),\n this._createDescriptionCell(apiMember, isInherited)\n ])\n );\n\n this._writeApiItemPage(apiMember);\n break;\n }\n case ApiItemKind.Method: {\n methodsTable.addRow(\n new DocTableRow({ configuration }, [\n this._createTitleCell(apiMember),\n this._createModifiersCell(apiMember),\n this._createDescriptionCell(apiMember, isInherited)\n ])\n );\n\n this._writeApiItemPage(apiMember);\n break;\n }\n case ApiItemKind.Property: {\n if ((apiMember as ApiPropertyItem).isEventProperty) {\n eventsTable.addRow(\n new DocTableRow({ configuration }, [\n this._createTitleCell(apiMember),\n this._createModifiersCell(apiMember),\n this._createPropertyTypeCell(apiMember),\n this._createDescriptionCell(apiMember, isInherited)\n ])\n );\n } else {\n propertiesTable.addRow(\n new DocTableRow({ configuration }, [\n this._createTitleCell(apiMember),\n this._createModifiersCell(apiMember),\n this._createPropertyTypeCell(apiMember),\n this._createDescriptionCell(apiMember, isInherited)\n ])\n );\n }\n\n this._writeApiItemPage(apiMember);\n break;\n }\n }\n }\n\n if (eventsTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Events' }));\n output.appendNode(eventsTable);\n }\n\n if (constructorsTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Constructors' }));\n output.appendNode(constructorsTable);\n }\n\n if (propertiesTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Properties' }));\n output.appendNode(propertiesTable);\n }\n\n if (methodsTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Methods' }));\n output.appendNode(methodsTable);\n }\n }\n\n /**\n * GENERATE PAGE: ENUM\n */\n private _writeEnumTables(output: DocSection, apiEnum: ApiEnum): void {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n const enumMembersTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Member', 'Value', 'Description']\n });\n\n for (const apiEnumMember of apiEnum.members) {\n enumMembersTable.addRow(\n new DocTableRow({ configuration }, [\n new DocTableCell({ configuration }, [\n new DocParagraph({ configuration }, [\n new DocPlainText({ configuration, text: Utilities.getConciseSignature(apiEnumMember) })\n ])\n ]),\n this._createInitializerCell(apiEnumMember),\n this._createDescriptionCell(apiEnumMember)\n ])\n );\n }\n\n if (enumMembersTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Enumeration Members' }));\n output.appendNode(enumMembersTable);\n }\n }\n\n /**\n * GENERATE PAGE: INTERFACE\n */\n private _writeInterfaceTables(output: DocSection, apiInterface: ApiInterface): void {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n const eventsTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Property', 'Modifiers', 'Type', 'Description']\n });\n\n const propertiesTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Property', 'Modifiers', 'Type', 'Description']\n });\n\n const methodsTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Method', 'Description']\n });\n\n const apiMembers: readonly ApiItem[] = this._getMembersAndWriteIncompleteWarning(apiInterface, output);\n for (const apiMember of apiMembers) {\n const isInherited: boolean = apiMember.parent !== apiInterface;\n switch (apiMember.kind) {\n case ApiItemKind.ConstructSignature:\n case ApiItemKind.MethodSignature: {\n methodsTable.addRow(\n new DocTableRow({ configuration }, [\n this._createTitleCell(apiMember),\n this._createDescriptionCell(apiMember, isInherited)\n ])\n );\n\n this._writeApiItemPage(apiMember);\n break;\n }\n case ApiItemKind.PropertySignature: {\n if ((apiMember as ApiPropertyItem).isEventProperty) {\n eventsTable.addRow(\n new DocTableRow({ configuration }, [\n this._createTitleCell(apiMember),\n this._createModifiersCell(apiMember),\n this._createPropertyTypeCell(apiMember),\n this._createDescriptionCell(apiMember, isInherited)\n ])\n );\n } else {\n propertiesTable.addRow(\n new DocTableRow({ configuration }, [\n this._createTitleCell(apiMember),\n this._createModifiersCell(apiMember),\n this._createPropertyTypeCell(apiMember),\n this._createDescriptionCell(apiMember, isInherited)\n ])\n );\n }\n\n this._writeApiItemPage(apiMember);\n break;\n }\n }\n }\n\n if (eventsTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Events' }));\n output.appendNode(eventsTable);\n }\n\n if (propertiesTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Properties' }));\n output.appendNode(propertiesTable);\n }\n\n if (methodsTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Methods' }));\n output.appendNode(methodsTable);\n }\n }\n\n /**\n * GENERATE PAGE: FUNCTION-LIKE\n */\n private _writeParameterTables(output: DocSection, apiParameterListMixin: ApiParameterListMixin): void {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n const parametersTable: DocTable = new DocTable({\n configuration,\n headerTitles: ['Parameter', 'Type', 'Description']\n });\n for (const apiParameter of apiParameterListMixin.parameters) {\n const parameterDescription: DocSection = new DocSection({ configuration });\n\n if (apiParameter.isOptional) {\n parameterDescription.appendNodesInParagraph([\n new DocEmphasisSpan({ configuration, italic: true }, [\n new DocPlainText({ configuration, text: '(Optional)' })\n ]),\n new DocPlainText({ configuration, text: ' ' })\n ]);\n }\n\n if (apiParameter.tsdocParamBlock) {\n this._appendAndMergeSection(parameterDescription, apiParameter.tsdocParamBlock.content);\n }\n\n parametersTable.addRow(\n new DocTableRow({ configuration }, [\n new DocTableCell({ configuration }, [\n new DocParagraph({ configuration }, [\n new DocPlainText({ configuration, text: apiParameter.name })\n ])\n ]),\n new DocTableCell({ configuration }, [\n this._createParagraphForTypeExcerpt(apiParameter.parameterTypeExcerpt)\n ]),\n new DocTableCell({ configuration }, parameterDescription.nodes)\n ])\n );\n }\n\n if (parametersTable.rows.length > 0) {\n output.appendNode(new DocHeading({ configuration, title: 'Parameters' }));\n output.appendNode(parametersTable);\n }\n\n if (ApiReturnTypeMixin.isBaseClassOf(apiParameterListMixin)) {\n const returnTypeExcerpt: Excerpt = apiParameterListMixin.returnTypeExcerpt;\n output.appendNode(\n new DocParagraph({ configuration }, [\n new DocEmphasisSpan({ configuration, bold: true }, [\n new DocPlainText({ configuration, text: 'Returns:' })\n ])\n ])\n );\n\n output.appendNode(this._createParagraphForTypeExcerpt(returnTypeExcerpt));\n\n if (apiParameterListMixin instanceof ApiDocumentedItem) {\n if (apiParameterListMixin.tsdocComment && apiParameterListMixin.tsdocComment.returnsBlock) {\n this._appendSection(output, apiParameterListMixin.tsdocComment.returnsBlock.content);\n }\n }\n }\n }\n\n private _createParagraphForTypeExcerpt(excerpt: Excerpt): DocParagraph {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n const paragraph: DocParagraph = new DocParagraph({ configuration });\n\n if (!excerpt.text.trim()) {\n paragraph.appendNode(new DocPlainText({ configuration, text: '(not declared)' }));\n } else {\n this._appendExcerptWithHyperlinks(paragraph, excerpt);\n }\n\n return paragraph;\n }\n\n private _appendExcerptWithHyperlinks(docNodeContainer: DocNodeContainer, excerpt: Excerpt): void {\n for (const token of excerpt.spannedTokens) {\n this._appendExcerptTokenWithHyperlinks(docNodeContainer, token);\n }\n }\n\n private _appendExcerptTokenWithHyperlinks(docNodeContainer: DocNodeContainer, token: ExcerptToken): void {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n // Markdown doesn't provide a standardized syntax for hyperlinks inside code spans, so we will render\n // the type expression as DocPlainText. Instead of creating multiple DocParagraphs, we can simply\n // discard any newlines and let the renderer do normal word-wrapping.\n const unwrappedTokenText: string = token.text.replace(/[\\r\\n]+/g, ' ');\n\n // If it's hyperlinkable, then append a DocLinkTag\n if (token.kind === ExcerptTokenKind.Reference && token.canonicalReference) {\n const apiItemResult: IResolveDeclarationReferenceResult = this._apiModel.resolveDeclarationReference(\n token.canonicalReference,\n undefined\n );\n\n if (apiItemResult.resolvedApiItem) {\n docNodeContainer.appendNode(\n new DocLinkTag({\n configuration,\n tagName: '@link',\n linkText: unwrappedTokenText,\n urlDestination: this._getLinkFilenameForApiItem(apiItemResult.resolvedApiItem)\n })\n );\n return;\n }\n }\n\n // Otherwise append non-hyperlinked text\n docNodeContainer.appendNode(new DocPlainText({ configuration, text: unwrappedTokenText }));\n }\n\n private _createTitleCell(apiItem: ApiItem): DocTableCell {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n let linkText: string = Utilities.getConciseSignature(apiItem);\n if (ApiOptionalMixin.isBaseClassOf(apiItem) && apiItem.isOptional) {\n linkText += '?';\n }\n\n return new DocTableCell({ configuration }, [\n new DocParagraph({ configuration }, [\n new DocLinkTag({\n configuration,\n tagName: '@link',\n linkText: linkText,\n urlDestination: this._getLinkFilenameForApiItem(apiItem)\n })\n ])\n ]);\n }\n\n /**\n * This generates a DocTableCell for an ApiItem including the summary section and \"(BETA)\" annotation.\n *\n * @remarks\n * We mostly assume that the input is an ApiDocumentedItem, but it's easier to perform this as a runtime\n * check than to have each caller perform a type cast.\n */\n private _createDescriptionCell(apiItem: ApiItem, isInherited: boolean = false): DocTableCell {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n const section: DocSection = new DocSection({ configuration });\n\n if (ApiReleaseTagMixin.isBaseClassOf(apiItem)) {\n if (apiItem.releaseTag === ReleaseTag.Alpha || apiItem.releaseTag === ReleaseTag.Beta) {\n section.appendNodesInParagraph([\n new DocEmphasisSpan({ configuration, bold: true, italic: true }, [\n new DocPlainText({\n configuration,\n text: `(${apiItem.releaseTag === ReleaseTag.Alpha ? 'ALPHA' : 'BETA'})`\n })\n ]),\n new DocPlainText({ configuration, text: ' ' })\n ]);\n }\n }\n\n if (ApiOptionalMixin.isBaseClassOf(apiItem) && apiItem.isOptional) {\n section.appendNodesInParagraph([\n new DocEmphasisSpan({ configuration, italic: true }, [\n new DocPlainText({ configuration, text: '(Optional)' })\n ]),\n new DocPlainText({ configuration, text: ' ' })\n ]);\n }\n\n if (apiItem instanceof ApiDocumentedItem) {\n if (apiItem.tsdocComment !== undefined) {\n this._appendAndMergeSection(section, apiItem.tsdocComment.summarySection);\n }\n }\n\n if (isInherited && apiItem.parent) {\n section.appendNode(\n new DocParagraph({ configuration }, [\n new DocPlainText({ configuration, text: '(Inherited from ' }),\n new DocLinkTag({\n configuration,\n tagName: '@link',\n linkText: apiItem.parent.displayName,\n urlDestination: this._getLinkFilenameForApiItem(apiItem.parent)\n }),\n new DocPlainText({ configuration, text: ')' })\n ])\n );\n }\n\n return new DocTableCell({ configuration }, section.nodes);\n }\n\n private _createModifiersCell(apiItem: ApiItem): DocTableCell {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n const section: DocSection = new DocSection({ configuration });\n\n // Output modifiers in syntactically correct order: first access modifier (here: `protected`), then\n // `static` or `abstract` (no member can be both, so the order between the two of them does not matter),\n // last `readonly`. If `override` was supported, it would go directly before `readonly`.\n\n if (ApiProtectedMixin.isBaseClassOf(apiItem)) {\n if (apiItem.isProtected) {\n section.appendNode(\n new DocParagraph({ configuration }, [new DocCodeSpan({ configuration, code: 'protected' })])\n );\n }\n }\n\n if (ApiStaticMixin.isBaseClassOf(apiItem)) {\n if (apiItem.isStatic) {\n section.appendNode(\n new DocParagraph({ configuration }, [new DocCodeSpan({ configuration, code: 'static' })])\n );\n }\n }\n\n if (ApiAbstractMixin.isBaseClassOf(apiItem)) {\n if (apiItem.isAbstract) {\n section.appendNode(\n new DocParagraph({ configuration }, [new DocCodeSpan({ configuration, code: 'abstract' })])\n );\n }\n }\n\n if (ApiReadonlyMixin.isBaseClassOf(apiItem)) {\n if (apiItem.isReadonly) {\n section.appendNode(\n new DocParagraph({ configuration }, [new DocCodeSpan({ configuration, code: 'readonly' })])\n );\n }\n }\n\n return new DocTableCell({ configuration }, section.nodes);\n }\n\n private _createPropertyTypeCell(apiItem: ApiItem): DocTableCell {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n const section: DocSection = new DocSection({ configuration });\n\n if (apiItem instanceof ApiPropertyItem) {\n section.appendNode(this._createParagraphForTypeExcerpt(apiItem.propertyTypeExcerpt));\n }\n\n return new DocTableCell({ configuration }, section.nodes);\n }\n\n private _createInitializerCell(apiItem: ApiItem): DocTableCell {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n const section: DocSection = new DocSection({ configuration });\n\n if (ApiInitializerMixin.isBaseClassOf(apiItem)) {\n if (apiItem.initializerExcerpt) {\n section.appendNodeInParagraph(\n new DocCodeSpan({ configuration, code: apiItem.initializerExcerpt.text })\n );\n }\n }\n\n return new DocTableCell({ configuration }, section.nodes);\n }\n\n private _writeBreadcrumb(output: DocSection, apiItem: ApiItem): void {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n\n output.appendNodeInParagraph(\n new DocLinkTag({\n configuration,\n tagName: '@link',\n linkText: 'Home',\n urlDestination: this._getLinkFilenameForApiItem(this._apiModel)\n })\n );\n\n for (const hierarchyItem of apiItem.getHierarchy()) {\n switch (hierarchyItem.kind) {\n case ApiItemKind.Model:\n case ApiItemKind.EntryPoint:\n // We don't show the model as part of the breadcrumb because it is the root-level container.\n // We don't show the entry point because today API Extractor doesn't support multiple entry points;\n // this may change in the future.\n break;\n default:\n output.appendNodesInParagraph([\n new DocPlainText({\n configuration,\n text: ' > '\n }),\n new DocLinkTag({\n configuration,\n tagName: '@link',\n linkText: hierarchyItem.displayName,\n urlDestination: this._getLinkFilenameForApiItem(hierarchyItem)\n })\n ]);\n }\n }\n }\n\n private _writeAlphaWarning(output: DocSection): void {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n const betaWarning: string =\n 'This API is provided as an alpha preview for developers and may change' +\n ' based on feedback that we receive. Do not use this API in a production environment.';\n output.appendNode(\n new DocNoteBox({ configuration }, [\n new DocParagraph({ configuration }, [new DocPlainText({ configuration, text: betaWarning })])\n ])\n );\n }\n\n private _writeBetaWarning(output: DocSection): void {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n const betaWarning: string =\n 'This API is provided as a beta preview for developers and may change' +\n ' based on feedback that we receive. Do not use this API in a production environment.';\n output.appendNode(\n new DocNoteBox({ configuration }, [\n new DocParagraph({ configuration }, [new DocPlainText({ configuration, text: betaWarning })])\n ])\n );\n }\n\n private _appendSection(output: DocSection, docSection: DocSection): void {\n for (const node of docSection.nodes) {\n output.appendNode(node);\n }\n }\n\n private _appendAndMergeSection(output: DocSection, docSection: DocSection): void {\n let firstNode: boolean = true;\n for (const node of docSection.nodes) {\n if (firstNode) {\n if (node.kind === DocNodeKind.Paragraph) {\n output.appendNodesInParagraph(node.getChildNodes());\n firstNode = false;\n continue;\n }\n }\n firstNode = false;\n\n output.appendNode(node);\n }\n }\n\n private _getMembersAndWriteIncompleteWarning(\n apiClassOrInterface: ApiClass | ApiInterface,\n output: DocSection\n ): readonly ApiItem[] {\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\n const showInheritedMembers: boolean = !!this._documenterConfig?.configFile.showInheritedMembers;\n if (!showInheritedMembers) {\n return apiClassOrInterface.members;\n }\n\n const result: IFindApiItemsResult = apiClassOrInterface.findMembersWithInheritance();\n\n // If the result is potentially incomplete, write a short warning communicating this.\n if (result.maybeIncompleteResult) {\n output.appendNode(\n new DocParagraph({ configuration }, [\n new DocEmphasisSpan({ configuration, italic: true }, [\n new DocPlainText({\n configuration,\n text: '(Some inherited members may not be shown because they are not represented in the documentation.)'\n })\n ])\n ])\n );\n }\n\n // Log the messages for diagnostic purposes.\n for (const message of result.messages) {\n console.log(`Diagnostic message for findMembersWithInheritance: ${message.text}`);\n }\n\n return result.items;\n }\n\n private _getFilenameForApiItem(apiItem: ApiItem): string {\n if (apiItem.kind === ApiItemKind.Model) {\n return 'index.md';\n }\n\n let baseName: string = '';\n for (const hierarchyItem of apiItem.getHierarchy()) {\n // For overloaded methods, add a suffix such as \"MyClass.myMethod_2\".\n let qualifiedName: string = Utilities.getSafeFilenameForName(hierarchyItem.displayName);\n if (ApiParameterListMixin.isBaseClassOf(hierarchyItem)) {\n if (hierarchyItem.overloadIndex > 1) {\n // Subtract one for compatibility with earlier releases of API Documenter.\n // (This will get revamped when we fix GitHub issue #1308)\n qualifiedName += `_${hierarchyItem.overloadIndex - 1}`;\n }\n }\n\n switch (hierarchyItem.kind) {\n case ApiItemKind.Model:\n case ApiItemKind.EntryPoint:\n case ApiItemKind.EnumMember:\n break;\n case ApiItemKind.Package:\n baseName = Utilities.getSafeFilenameForName(PackageName.getUnscopedName(hierarchyItem.displayName));\n break;\n default:\n baseName += '.' + qualifiedName;\n }\n }\n return baseName + '.md';\n }\n\n private _getLinkFilenameForApiItem(apiItem: ApiItem): string {\n return './' + this._getFilenameForApiItem(apiItem);\n }\n\n private _deleteOldOutputFiles(): void {\n console.log('Deleting old output from ' + this._outputFolder);\n FileSystem.ensureEmptyFolder(this._outputFolder);\n }\n}\n"]} |