@microsoft/api-documenter 7.13.74 → 7.13.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +18 -0
- package/CHANGELOG.md +6 -1
- package/lib/documenters/ExperimentalYamlDocumenter.js +2 -2
- package/lib/documenters/ExperimentalYamlDocumenter.js.map +1 -1
- package/lib/documenters/MarkdownDocumenter.js +58 -58
- package/lib/documenters/MarkdownDocumenter.js.map +1 -1
- package/lib/documenters/YamlDocumenter.js +42 -42
- package/lib/documenters/YamlDocumenter.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownDocumenter.js","sourceRoot":"","sources":["../../src/documenters/MarkdownDocumenter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;AAE3D,2CAA6B;AAC7B,oEAAoF;AACpF,4CAc0B;AAC1B,wEAuBwC;AAExC,kEAA4D;AAC5D,oDAAiD;AACjD,gDAA6C;AAC7C,8DAA2D;AAC3D,sDAAmD;AACnD,wDAAqD;AACrD,oDAAiD;AACjD,kDAA+C;AAC/C,6EAA0E;AAC1E,yDAAsD;AACtD,mFAG6C;AAE7C,qFAAkF;AAQlF;;;GAGG;AACH,MAAa,kBAAkB;IAQ7B,YAAmB,OAAmC;QACpD,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC;QAClC,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QAClD,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;QAC1C,IAAI,CAAC,mBAAmB,GAAG,kCAAc,CAAC,aAAa,CAAC;QACxD,IAAI,CAAC,gBAAgB,GAAG,IAAI,6CAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAElE,IAAI,CAAC,aAAa,GAAG,IAAI,2BAAY,EAAE,CAAC;IAC1C,C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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,yBAAuB;gBACvB,mCAA4B;gBAC5B;oBACE,MAAM;gBACR;oBACE,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;AAtiCD,gDAsiCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport * as path from 'path';\r\nimport { PackageName, FileSystem, NewlineKind } from '@rushstack/node-core-library';\r\nimport {\r\n DocSection,\r\n DocPlainText,\r\n DocLinkTag,\r\n TSDocConfiguration,\r\n StringBuilder,\r\n DocNodeKind,\r\n DocParagraph,\r\n DocCodeSpan,\r\n DocFencedCode,\r\n StandardTags,\r\n DocBlock,\r\n DocComment,\r\n DocNodeContainer\r\n} from '@microsoft/tsdoc';\r\nimport {\r\n ApiModel,\r\n ApiItem,\r\n ApiEnum,\r\n ApiPackage,\r\n ApiItemKind,\r\n ApiReleaseTagMixin,\r\n ApiDocumentedItem,\r\n ApiClass,\r\n ReleaseTag,\r\n ApiStaticMixin,\r\n ApiPropertyItem,\r\n ApiInterface,\r\n Excerpt,\r\n ApiParameterListMixin,\r\n ApiReturnTypeMixin,\r\n ApiDeclaredItem,\r\n ApiNamespace,\r\n ExcerptTokenKind,\r\n IResolveDeclarationReferenceResult,\r\n ApiTypeAlias,\r\n ExcerptToken,\r\n ApiOptionalMixin\r\n} from '@microsoft/api-extractor-model';\r\n\r\nimport { CustomDocNodes } from '../nodes/CustomDocNodeKind';\r\nimport { DocHeading } from '../nodes/DocHeading';\r\nimport { DocTable } from '../nodes/DocTable';\r\nimport { DocEmphasisSpan } from '../nodes/DocEmphasisSpan';\r\nimport { DocTableRow } from '../nodes/DocTableRow';\r\nimport { DocTableCell } from '../nodes/DocTableCell';\r\nimport { DocNoteBox } from '../nodes/DocNoteBox';\r\nimport { Utilities } from '../utils/Utilities';\r\nimport { CustomMarkdownEmitter } from '../markdown/CustomMarkdownEmitter';\r\nimport { PluginLoader } from '../plugin/PluginLoader';\r\nimport {\r\n IMarkdownDocumenterFeatureOnBeforeWritePageArgs,\r\n MarkdownDocumenterFeatureContext\r\n} from '../plugin/MarkdownDocumenterFeature';\r\nimport { DocumenterConfig } from './DocumenterConfig';\r\nimport { MarkdownDocumenterAccessor } from '../plugin/MarkdownDocumenterAccessor';\r\n\r\nexport interface IMarkdownDocumenterOptions {\r\n apiModel: ApiModel;\r\n documenterConfig: DocumenterConfig | undefined;\r\n outputFolder: string;\r\n}\r\n\r\n/**\r\n * Renders API documentation in the Markdown file format.\r\n * For more info: https://en.wikipedia.org/wiki/Markdown\r\n */\r\nexport class MarkdownDocumenter {\r\n private readonly _apiModel: ApiModel;\r\n private readonly _documenterConfig: DocumenterConfig | undefined;\r\n private readonly _tsdocConfiguration: TSDocConfiguration;\r\n private readonly _markdownEmitter: CustomMarkdownEmitter;\r\n private readonly _outputFolder: string;\r\n private readonly _pluginLoader: PluginLoader;\r\n\r\n public constructor(options: IMarkdownDocumenterOptions) {\r\n this._apiModel = options.apiModel;\r\n this._documenterConfig = options.documenterConfig;\r\n this._outputFolder = options.outputFolder;\r\n this._tsdocConfiguration = CustomDocNodes.configuration;\r\n this._markdownEmitter = new CustomMarkdownEmitter(this._apiModel);\r\n\r\n this._pluginLoader = new PluginLoader();\r\n }\r\n\r\n public generateFiles(): void {\r\n if (this._documenterConfig) {\r\n this._pluginLoader.load(this._documenterConfig, () => {\r\n return new MarkdownDocumenterFeatureContext({\r\n apiModel: this._apiModel,\r\n outputFolder: this._outputFolder,\r\n documenter: new MarkdownDocumenterAccessor({\r\n getLinkForApiItem: (apiItem: ApiItem) => {\r\n return this._getLinkFilenameForApiItem(apiItem);\r\n }\r\n })\r\n });\r\n });\r\n }\r\n\r\n console.log();\r\n this._deleteOldOutputFiles();\r\n\r\n this._writeApiItemPage(this._apiModel);\r\n\r\n if (this._pluginLoader.markdownDocumenterFeature) {\r\n this._pluginLoader.markdownDocumenterFeature.onFinished({});\r\n }\r\n }\r\n\r\n private _writeApiItemPage(apiItem: ApiItem): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n const output: DocSection = new DocSection({ configuration: this._tsdocConfiguration });\r\n\r\n this._writeBreadcrumb(output, apiItem);\r\n\r\n const scopedName: string = apiItem.getScopedNameWithinPackage();\r\n\r\n switch (apiItem.kind) {\r\n case ApiItemKind.Class:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} class` }));\r\n break;\r\n case ApiItemKind.Enum:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} enum` }));\r\n break;\r\n case ApiItemKind.Interface:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} interface` }));\r\n break;\r\n case ApiItemKind.Constructor:\r\n case ApiItemKind.ConstructSignature:\r\n output.appendNode(new DocHeading({ configuration, title: scopedName }));\r\n break;\r\n case ApiItemKind.Method:\r\n case ApiItemKind.MethodSignature:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} method` }));\r\n break;\r\n case ApiItemKind.Function:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} function` }));\r\n break;\r\n case ApiItemKind.Model:\r\n output.appendNode(new DocHeading({ configuration, title: `API Reference` }));\r\n break;\r\n case ApiItemKind.Namespace:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} namespace` }));\r\n break;\r\n case ApiItemKind.Package:\r\n console.log(`Writing ${apiItem.displayName} package`);\r\n const unscopedPackageName: string = PackageName.getUnscopedName(apiItem.displayName);\r\n output.appendNode(new DocHeading({ configuration, title: `${unscopedPackageName} package` }));\r\n break;\r\n case ApiItemKind.Property:\r\n case ApiItemKind.PropertySignature:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} property` }));\r\n break;\r\n case ApiItemKind.TypeAlias:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} type` }));\r\n break;\r\n case ApiItemKind.Variable:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} variable` }));\r\n break;\r\n default:\r\n throw new Error('Unsupported API item kind: ' + apiItem.kind);\r\n }\r\n\r\n if (ApiReleaseTagMixin.isBaseClassOf(apiItem)) {\r\n if (apiItem.releaseTag === ReleaseTag.Beta) {\r\n this._writeBetaWarning(output);\r\n }\r\n }\r\n\r\n const decoratorBlocks: DocBlock[] = [];\r\n\r\n if (apiItem instanceof ApiDocumentedItem) {\r\n const tsdocComment: DocComment | undefined = apiItem.tsdocComment;\r\n\r\n if (tsdocComment) {\r\n decoratorBlocks.push(\r\n ...tsdocComment.customBlocks.filter(\r\n (block) => block.blockTag.tagNameWithUpperCase === StandardTags.decorator.tagNameWithUpperCase\r\n )\r\n );\r\n\r\n if (tsdocComment.deprecatedBlock) {\r\n output.appendNode(\r\n new DocNoteBox({ configuration: this._tsdocConfiguration }, [\r\n new DocParagraph({ configuration: this._tsdocConfiguration }, [\r\n new DocPlainText({\r\n configuration: this._tsdocConfiguration,\r\n text: 'Warning: This API is now obsolete. '\r\n })\r\n ]),\r\n ...tsdocComment.deprecatedBlock.content.nodes\r\n ])\r\n );\r\n }\r\n\r\n this._appendSection(output, tsdocComment.summarySection);\r\n }\r\n }\r\n\r\n if (apiItem instanceof ApiDeclaredItem) {\r\n if (apiItem.excerpt.text.length > 0) {\r\n output.appendNode(\r\n new DocParagraph({ configuration }, [\r\n new DocEmphasisSpan({ configuration, bold: true }, [\r\n new DocPlainText({ configuration, text: 'Signature:' })\r\n ])\r\n ])\r\n );\r\n output.appendNode(\r\n new DocFencedCode({\r\n configuration,\r\n code: apiItem.getExcerptWithModifiers(),\r\n language: 'typescript'\r\n })\r\n );\r\n }\r\n\r\n this._writeHeritageTypes(output, apiItem);\r\n }\r\n\r\n if (decoratorBlocks.length > 0) {\r\n output.appendNode(\r\n new DocParagraph({ configuration }, [\r\n new DocEmphasisSpan({ configuration, bold: true }, [\r\n new DocPlainText({ configuration, text: 'Decorators:' })\r\n ])\r\n ])\r\n );\r\n for (const decoratorBlock of decoratorBlocks) {\r\n output.appendNodes(decoratorBlock.content.nodes);\r\n }\r\n }\r\n\r\n let appendRemarks: boolean = true;\r\n switch (apiItem.kind) {\r\n case ApiItemKind.Class:\r\n case ApiItemKind.Interface:\r\n case ApiItemKind.Namespace:\r\n case ApiItemKind.Package:\r\n this._writeRemarksSection(output, apiItem);\r\n appendRemarks = false;\r\n break;\r\n }\r\n\r\n switch (apiItem.kind) {\r\n case ApiItemKind.Class:\r\n this._writeClassTables(output, apiItem as ApiClass);\r\n break;\r\n case ApiItemKind.Enum:\r\n this._writeEnumTables(output, apiItem as ApiEnum);\r\n break;\r\n case ApiItemKind.Interface:\r\n this._writeInterfaceTables(output, apiItem as ApiInterface);\r\n break;\r\n case ApiItemKind.Constructor:\r\n case ApiItemKind.ConstructSignature:\r\n case ApiItemKind.Method:\r\n case ApiItemKind.MethodSignature:\r\n case ApiItemKind.Function:\r\n this._writeParameterTables(output, apiItem as ApiParameterListMixin);\r\n this._writeThrowsSection(output, apiItem);\r\n break;\r\n case ApiItemKind.Namespace:\r\n this._writePackageOrNamespaceTables(output, apiItem as ApiNamespace);\r\n break;\r\n case ApiItemKind.Model:\r\n this._writeModelTable(output, apiItem as ApiModel);\r\n break;\r\n case ApiItemKind.Package:\r\n this._writePackageOrNamespaceTables(output, apiItem as ApiPackage);\r\n break;\r\n case ApiItemKind.Property:\r\n case ApiItemKind.PropertySignature:\r\n break;\r\n case ApiItemKind.TypeAlias:\r\n break;\r\n case ApiItemKind.Variable:\r\n break;\r\n default:\r\n throw new Error('Unsupported API item kind: ' + apiItem.kind);\r\n }\r\n\r\n if (appendRemarks) {\r\n this._writeRemarksSection(output, apiItem);\r\n }\r\n\r\n const filename: string = path.join(this._outputFolder, this._getFilenameForApiItem(apiItem));\r\n const stringBuilder: StringBuilder = new StringBuilder();\r\n\r\n stringBuilder.append(\r\n '<!-- Do not edit this file. It is automatically generated by API Documenter. -->\\n\\n'\r\n );\r\n\r\n this._markdownEmitter.emit(stringBuilder, output, {\r\n contextApiItem: apiItem,\r\n onGetFilenameForApiItem: (apiItemForFilename: ApiItem) => {\r\n return this._getLinkFilenameForApiItem(apiItemForFilename);\r\n }\r\n });\r\n\r\n let pageContent: string = stringBuilder.toString();\r\n\r\n if (this._pluginLoader.markdownDocumenterFeature) {\r\n // Allow the plugin to customize the pageContent\r\n const eventArgs: IMarkdownDocumenterFeatureOnBeforeWritePageArgs = {\r\n apiItem: apiItem,\r\n outputFilename: filename,\r\n pageContent: pageContent\r\n };\r\n this._pluginLoader.markdownDocumenterFeature.onBeforeWritePage(eventArgs);\r\n pageContent = eventArgs.pageContent;\r\n }\r\n\r\n FileSystem.writeFile(filename, pageContent, {\r\n convertLineEndings: this._documenterConfig ? this._documenterConfig.newlineKind : NewlineKind.CrLf\r\n });\r\n }\r\n\r\n private _writeHeritageTypes(output: DocSection, apiItem: ApiDeclaredItem): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n if (apiItem instanceof ApiClass) {\r\n if (apiItem.extendsType) {\r\n const extendsParagraph: DocParagraph = new DocParagraph({ configuration }, [\r\n new DocEmphasisSpan({ configuration, bold: true }, [\r\n new DocPlainText({ configuration, text: 'Extends: ' })\r\n ])\r\n ]);\r\n this._appendExcerptWithHyperlinks(extendsParagraph, apiItem.extendsType.excerpt);\r\n output.appendNode(extendsParagraph);\r\n }\r\n if (apiItem.implementsTypes.length > 0) {\r\n const extendsParagraph: DocParagraph = new DocParagraph({ configuration }, [\r\n new DocEmphasisSpan({ configuration, bold: true }, [\r\n new DocPlainText({ configuration, text: 'Implements: ' })\r\n ])\r\n ]);\r\n let needsComma: boolean = false;\r\n for (const implementsType of apiItem.implementsTypes) {\r\n if (needsComma) {\r\n extendsParagraph.appendNode(new DocPlainText({ configuration, text: ', ' }));\r\n }\r\n this._appendExcerptWithHyperlinks(extendsParagraph, implementsType.excerpt);\r\n needsComma = true;\r\n }\r\n output.appendNode(extendsParagraph);\r\n }\r\n }\r\n\r\n if (apiItem instanceof ApiInterface) {\r\n if (apiItem.extendsTypes.length > 0) {\r\n const extendsParagraph: DocParagraph = new DocParagraph({ configuration }, [\r\n new DocEmphasisSpan({ configuration, bold: true }, [\r\n new DocPlainText({ configuration, text: 'Extends: ' })\r\n ])\r\n ]);\r\n let needsComma: boolean = false;\r\n for (const extendsType of apiItem.extendsTypes) {\r\n if (needsComma) {\r\n extendsParagraph.appendNode(new DocPlainText({ configuration, text: ', ' }));\r\n }\r\n this._appendExcerptWithHyperlinks(extendsParagraph, extendsType.excerpt);\r\n needsComma = true;\r\n }\r\n output.appendNode(extendsParagraph);\r\n }\r\n }\r\n\r\n if (apiItem instanceof ApiTypeAlias) {\r\n const refs: ExcerptToken[] = apiItem.excerptTokens.filter(\r\n (token) =>\r\n token.kind === ExcerptTokenKind.Reference &&\r\n token.canonicalReference &&\r\n this._apiModel.resolveDeclarationReference(token.canonicalReference, undefined).resolvedApiItem\r\n );\r\n if (refs.length > 0) {\r\n const referencesParagraph: DocParagraph = new DocParagraph({ configuration }, [\r\n new DocEmphasisSpan({ configuration, bold: true }, [\r\n new DocPlainText({ configuration, text: 'References: ' })\r\n ])\r\n ]);\r\n let needsComma: boolean = false;\r\n const visited: Set<string> = new Set();\r\n for (const ref of refs) {\r\n if (visited.has(ref.text)) {\r\n continue;\r\n }\r\n visited.add(ref.text);\r\n\r\n if (needsComma) {\r\n referencesParagraph.appendNode(new DocPlainText({ configuration, text: ', ' }));\r\n }\r\n\r\n this._appendExcerptTokenWithHyperlinks(referencesParagraph, ref);\r\n needsComma = true;\r\n }\r\n output.appendNode(referencesParagraph);\r\n }\r\n }\r\n }\r\n\r\n private _writeRemarksSection(output: DocSection, apiItem: ApiItem): void {\r\n if (apiItem instanceof ApiDocumentedItem) {\r\n const tsdocComment: DocComment | undefined = apiItem.tsdocComment;\r\n\r\n if (tsdocComment) {\r\n // Write the @remarks block\r\n if (tsdocComment.remarksBlock) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Remarks' }));\r\n this._appendSection(output, tsdocComment.remarksBlock.content);\r\n }\r\n\r\n // Write the @example blocks\r\n const exampleBlocks: DocBlock[] = tsdocComment.customBlocks.filter(\r\n (x) => x.blockTag.tagNameWithUpperCase === StandardTags.example.tagNameWithUpperCase\r\n );\r\n\r\n let exampleNumber: number = 1;\r\n for (const exampleBlock of exampleBlocks) {\r\n const heading: string = exampleBlocks.length > 1 ? `Example ${exampleNumber}` : 'Example';\r\n\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: heading }));\r\n\r\n this._appendSection(output, exampleBlock.content);\r\n\r\n ++exampleNumber;\r\n }\r\n }\r\n }\r\n }\r\n\r\n private _writeThrowsSection(output: DocSection, apiItem: ApiItem): void {\r\n if (apiItem instanceof ApiDocumentedItem) {\r\n const tsdocComment: DocComment | undefined = apiItem.tsdocComment;\r\n\r\n if (tsdocComment) {\r\n // Write the @throws blocks\r\n const throwsBlocks: DocBlock[] = tsdocComment.customBlocks.filter(\r\n (x) => x.blockTag.tagNameWithUpperCase === StandardTags.throws.tagNameWithUpperCase\r\n );\r\n\r\n if (throwsBlocks.length > 0) {\r\n const heading: string = 'Exceptions';\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: heading }));\r\n\r\n for (const throwsBlock of throwsBlocks) {\r\n this._appendSection(output, throwsBlock.content);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * GENERATE PAGE: MODEL\r\n */\r\n private _writeModelTable(output: DocSection, apiModel: ApiModel): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const packagesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Package', 'Description']\r\n });\r\n\r\n for (const apiMember of apiModel.members) {\r\n const row: DocTableRow = new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ]);\r\n\r\n switch (apiMember.kind) {\r\n case ApiItemKind.Package:\r\n packagesTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n }\r\n }\r\n\r\n if (packagesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Packages' }));\r\n output.appendNode(packagesTable);\r\n }\r\n }\r\n\r\n /**\r\n * GENERATE PAGE: PACKAGE or NAMESPACE\r\n */\r\n private _writePackageOrNamespaceTables(output: DocSection, apiContainer: ApiPackage | ApiNamespace): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const classesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Class', 'Description']\r\n });\r\n\r\n const enumerationsTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Enumeration', 'Description']\r\n });\r\n\r\n const functionsTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Function', 'Description']\r\n });\r\n\r\n const interfacesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Interface', 'Description']\r\n });\r\n\r\n const namespacesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Namespace', 'Description']\r\n });\r\n\r\n const variablesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Variable', 'Description']\r\n });\r\n\r\n const typeAliasesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Type Alias', 'Description']\r\n });\r\n\r\n const apiMembers: ReadonlyArray<ApiItem> =\r\n apiContainer.kind === ApiItemKind.Package\r\n ? (apiContainer as ApiPackage).entryPoints[0].members\r\n : (apiContainer as ApiNamespace).members;\r\n\r\n for (const apiMember of apiMembers) {\r\n const row: DocTableRow = new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ]);\r\n\r\n switch (apiMember.kind) {\r\n case ApiItemKind.Class:\r\n classesTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n\r\n case ApiItemKind.Enum:\r\n enumerationsTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n\r\n case ApiItemKind.Interface:\r\n interfacesTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n\r\n case ApiItemKind.Namespace:\r\n namespacesTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n\r\n case ApiItemKind.Function:\r\n functionsTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n\r\n case ApiItemKind.TypeAlias:\r\n typeAliasesTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n\r\n case ApiItemKind.Variable:\r\n variablesTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n }\r\n }\r\n\r\n if (classesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Classes' }));\r\n output.appendNode(classesTable);\r\n }\r\n\r\n if (enumerationsTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Enumerations' }));\r\n output.appendNode(enumerationsTable);\r\n }\r\n if (functionsTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Functions' }));\r\n output.appendNode(functionsTable);\r\n }\r\n\r\n if (interfacesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Interfaces' }));\r\n output.appendNode(interfacesTable);\r\n }\r\n\r\n if (namespacesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Namespaces' }));\r\n output.appendNode(namespacesTable);\r\n }\r\n\r\n if (variablesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Variables' }));\r\n output.appendNode(variablesTable);\r\n }\r\n\r\n if (typeAliasesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Type Aliases' }));\r\n output.appendNode(typeAliasesTable);\r\n }\r\n }\r\n\r\n /**\r\n * GENERATE PAGE: CLASS\r\n */\r\n private _writeClassTables(output: DocSection, apiClass: ApiClass): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const eventsTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Property', 'Modifiers', 'Type', 'Description']\r\n });\r\n\r\n const constructorsTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Constructor', 'Modifiers', 'Description']\r\n });\r\n\r\n const propertiesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Property', 'Modifiers', 'Type', 'Description']\r\n });\r\n\r\n const methodsTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Method', 'Modifiers', 'Description']\r\n });\r\n\r\n for (const apiMember of apiClass.members) {\r\n switch (apiMember.kind) {\r\n case ApiItemKind.Constructor: {\r\n constructorsTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createModifiersCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ])\r\n );\r\n\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n }\r\n case ApiItemKind.Method: {\r\n methodsTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createModifiersCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ])\r\n );\r\n\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n }\r\n case ApiItemKind.Property: {\r\n if ((apiMember as ApiPropertyItem).isEventProperty) {\r\n eventsTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createModifiersCell(apiMember),\r\n this._createPropertyTypeCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ])\r\n );\r\n } else {\r\n propertiesTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createModifiersCell(apiMember),\r\n this._createPropertyTypeCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ])\r\n );\r\n }\r\n\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (eventsTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Events' }));\r\n output.appendNode(eventsTable);\r\n }\r\n\r\n if (constructorsTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Constructors' }));\r\n output.appendNode(constructorsTable);\r\n }\r\n\r\n if (propertiesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Properties' }));\r\n output.appendNode(propertiesTable);\r\n }\r\n\r\n if (methodsTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Methods' }));\r\n output.appendNode(methodsTable);\r\n }\r\n }\r\n\r\n /**\r\n * GENERATE PAGE: ENUM\r\n */\r\n private _writeEnumTables(output: DocSection, apiEnum: ApiEnum): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const enumMembersTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Member', 'Value', 'Description']\r\n });\r\n\r\n for (const apiEnumMember of apiEnum.members) {\r\n enumMembersTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n new DocTableCell({ configuration }, [\r\n new DocParagraph({ configuration }, [\r\n new DocPlainText({ configuration, text: Utilities.getConciseSignature(apiEnumMember) })\r\n ])\r\n ]),\r\n\r\n new DocTableCell({ configuration }, [\r\n new DocParagraph({ configuration }, [\r\n new DocCodeSpan({ configuration, code: apiEnumMember.initializerExcerpt.text })\r\n ])\r\n ]),\r\n\r\n this._createDescriptionCell(apiEnumMember)\r\n ])\r\n );\r\n }\r\n\r\n if (enumMembersTable.rows.length > 0) {\r\n output.appendNode(\r\n new DocHeading({ configuration: this._tsdocConfiguration, title: 'Enumeration Members' })\r\n );\r\n output.appendNode(enumMembersTable);\r\n }\r\n }\r\n\r\n /**\r\n * GENERATE PAGE: INTERFACE\r\n */\r\n private _writeInterfaceTables(output: DocSection, apiClass: ApiInterface): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const eventsTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Property', 'Type', 'Description']\r\n });\r\n\r\n const propertiesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Property', 'Type', 'Description']\r\n });\r\n\r\n const methodsTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Method', 'Description']\r\n });\r\n\r\n for (const apiMember of apiClass.members) {\r\n switch (apiMember.kind) {\r\n case ApiItemKind.ConstructSignature:\r\n case ApiItemKind.MethodSignature: {\r\n methodsTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ])\r\n );\r\n\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n }\r\n case ApiItemKind.PropertySignature: {\r\n if ((apiMember as ApiPropertyItem).isEventProperty) {\r\n eventsTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createPropertyTypeCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ])\r\n );\r\n } else {\r\n propertiesTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createPropertyTypeCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ])\r\n );\r\n }\r\n\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (eventsTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Events' }));\r\n output.appendNode(eventsTable);\r\n }\r\n\r\n if (propertiesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Properties' }));\r\n output.appendNode(propertiesTable);\r\n }\r\n\r\n if (methodsTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Methods' }));\r\n output.appendNode(methodsTable);\r\n }\r\n }\r\n\r\n /**\r\n * GENERATE PAGE: FUNCTION-LIKE\r\n */\r\n private _writeParameterTables(output: DocSection, apiParameterListMixin: ApiParameterListMixin): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const parametersTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Parameter', 'Type', 'Description']\r\n });\r\n for (const apiParameter of apiParameterListMixin.parameters) {\r\n const parameterDescription: DocSection = new DocSection({ configuration });\r\n if (apiParameter.tsdocParamBlock) {\r\n this._appendSection(parameterDescription, apiParameter.tsdocParamBlock.content);\r\n }\r\n\r\n parametersTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n new DocTableCell({ configuration }, [\r\n new DocParagraph({ configuration }, [\r\n new DocPlainText({ configuration, text: apiParameter.name })\r\n ])\r\n ]),\r\n new DocTableCell({ configuration }, [\r\n this._createParagraphForTypeExcerpt(apiParameter.parameterTypeExcerpt)\r\n ]),\r\n new DocTableCell({ configuration }, parameterDescription.nodes)\r\n ])\r\n );\r\n }\r\n\r\n if (parametersTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Parameters' }));\r\n output.appendNode(parametersTable);\r\n }\r\n\r\n if (ApiReturnTypeMixin.isBaseClassOf(apiParameterListMixin)) {\r\n const returnTypeExcerpt: Excerpt = apiParameterListMixin.returnTypeExcerpt;\r\n output.appendNode(\r\n new DocParagraph({ configuration }, [\r\n new DocEmphasisSpan({ configuration, bold: true }, [\r\n new DocPlainText({ configuration, text: 'Returns:' })\r\n ])\r\n ])\r\n );\r\n\r\n output.appendNode(this._createParagraphForTypeExcerpt(returnTypeExcerpt));\r\n\r\n if (apiParameterListMixin instanceof ApiDocumentedItem) {\r\n if (apiParameterListMixin.tsdocComment && apiParameterListMixin.tsdocComment.returnsBlock) {\r\n this._appendSection(output, apiParameterListMixin.tsdocComment.returnsBlock.content);\r\n }\r\n }\r\n }\r\n }\r\n\r\n private _createParagraphForTypeExcerpt(excerpt: Excerpt): DocParagraph {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const paragraph: DocParagraph = new DocParagraph({ configuration });\r\n\r\n if (!excerpt.text.trim()) {\r\n paragraph.appendNode(new DocPlainText({ configuration, text: '(not declared)' }));\r\n } else {\r\n this._appendExcerptWithHyperlinks(paragraph, excerpt);\r\n }\r\n\r\n return paragraph;\r\n }\r\n\r\n private _appendExcerptWithHyperlinks(docNodeContainer: DocNodeContainer, excerpt: Excerpt): void {\r\n for (const token of excerpt.spannedTokens) {\r\n this._appendExcerptTokenWithHyperlinks(docNodeContainer, token);\r\n }\r\n }\r\n\r\n private _appendExcerptTokenWithHyperlinks(docNodeContainer: DocNodeContainer, token: ExcerptToken): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n // Markdown doesn't provide a standardized syntax for hyperlinks inside code spans, so we will render\r\n // the type expression as DocPlainText. Instead of creating multiple DocParagraphs, we can simply\r\n // discard any newlines and let the renderer do normal word-wrapping.\r\n const unwrappedTokenText: string = token.text.replace(/[\\r\\n]+/g, ' ');\r\n\r\n // If it's hyperlinkable, then append a DocLinkTag\r\n if (token.kind === ExcerptTokenKind.Reference && token.canonicalReference) {\r\n const apiItemResult: IResolveDeclarationReferenceResult = this._apiModel.resolveDeclarationReference(\r\n token.canonicalReference,\r\n undefined\r\n );\r\n\r\n if (apiItemResult.resolvedApiItem) {\r\n docNodeContainer.appendNode(\r\n new DocLinkTag({\r\n configuration,\r\n tagName: '@link',\r\n linkText: unwrappedTokenText,\r\n urlDestination: this._getLinkFilenameForApiItem(apiItemResult.resolvedApiItem)\r\n })\r\n );\r\n return;\r\n }\r\n }\r\n\r\n // Otherwise append non-hyperlinked text\r\n docNodeContainer.appendNode(new DocPlainText({ configuration, text: unwrappedTokenText }));\r\n }\r\n\r\n private _createTitleCell(apiItem: ApiItem): DocTableCell {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n let linkText: string = Utilities.getConciseSignature(apiItem);\r\n if (ApiOptionalMixin.isBaseClassOf(apiItem) && apiItem.isOptional) {\r\n linkText += '?';\r\n }\r\n\r\n return new DocTableCell({ configuration }, [\r\n new DocParagraph({ configuration }, [\r\n new DocLinkTag({\r\n configuration,\r\n tagName: '@link',\r\n linkText: linkText,\r\n urlDestination: this._getLinkFilenameForApiItem(apiItem)\r\n })\r\n ])\r\n ]);\r\n }\r\n\r\n /**\r\n * This generates a DocTableCell for an ApiItem including the summary section and \"(BETA)\" annotation.\r\n *\r\n * @remarks\r\n * We mostly assume that the input is an ApiDocumentedItem, but it's easier to perform this as a runtime\r\n * check than to have each caller perform a type cast.\r\n */\r\n private _createDescriptionCell(apiItem: ApiItem): DocTableCell {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const section: DocSection = new DocSection({ configuration });\r\n\r\n if (ApiReleaseTagMixin.isBaseClassOf(apiItem)) {\r\n if (apiItem.releaseTag === ReleaseTag.Beta) {\r\n section.appendNodesInParagraph([\r\n new DocEmphasisSpan({ configuration, bold: true, italic: true }, [\r\n new DocPlainText({ configuration, text: '(BETA)' })\r\n ]),\r\n new DocPlainText({ configuration, text: ' ' })\r\n ]);\r\n }\r\n }\r\n\r\n if (ApiOptionalMixin.isBaseClassOf(apiItem) && apiItem.isOptional) {\r\n section.appendNodesInParagraph([\r\n new DocEmphasisSpan({ configuration, italic: true }, [\r\n new DocPlainText({ configuration, text: '(Optional)' })\r\n ]),\r\n new DocPlainText({ configuration, text: ' ' })\r\n ]);\r\n }\r\n\r\n if (apiItem instanceof ApiDocumentedItem) {\r\n if (apiItem.tsdocComment !== undefined) {\r\n this._appendAndMergeSection(section, apiItem.tsdocComment.summarySection);\r\n }\r\n }\r\n\r\n return new DocTableCell({ configuration }, section.nodes);\r\n }\r\n\r\n private _createModifiersCell(apiItem: ApiItem): DocTableCell {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const section: DocSection = new DocSection({ configuration });\r\n\r\n if (ApiStaticMixin.isBaseClassOf(apiItem)) {\r\n if (apiItem.isStatic) {\r\n section.appendNodeInParagraph(new DocCodeSpan({ configuration, code: 'static' }));\r\n }\r\n }\r\n\r\n return new DocTableCell({ configuration }, section.nodes);\r\n }\r\n\r\n private _createPropertyTypeCell(apiItem: ApiItem): DocTableCell {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const section: DocSection = new DocSection({ configuration });\r\n\r\n if (apiItem instanceof ApiPropertyItem) {\r\n section.appendNode(this._createParagraphForTypeExcerpt(apiItem.propertyTypeExcerpt));\r\n }\r\n\r\n return new DocTableCell({ configuration }, section.nodes);\r\n }\r\n\r\n private _writeBreadcrumb(output: DocSection, apiItem: ApiItem): void {\r\n output.appendNodeInParagraph(\r\n new DocLinkTag({\r\n configuration: this._tsdocConfiguration,\r\n tagName: '@link',\r\n linkText: 'Home',\r\n urlDestination: this._getLinkFilenameForApiItem(this._apiModel)\r\n })\r\n );\r\n\r\n for (const hierarchyItem of apiItem.getHierarchy()) {\r\n switch (hierarchyItem.kind) {\r\n case ApiItemKind.Model:\r\n case ApiItemKind.EntryPoint:\r\n // We don't show the model as part of the breadcrumb because it is the root-level container.\r\n // We don't show the entry point because today API Extractor doesn't support multiple entry points;\r\n // this may change in the future.\r\n break;\r\n default:\r\n output.appendNodesInParagraph([\r\n new DocPlainText({\r\n configuration: this._tsdocConfiguration,\r\n text: ' > '\r\n }),\r\n new DocLinkTag({\r\n configuration: this._tsdocConfiguration,\r\n tagName: '@link',\r\n linkText: hierarchyItem.displayName,\r\n urlDestination: this._getLinkFilenameForApiItem(hierarchyItem)\r\n })\r\n ]);\r\n }\r\n }\r\n }\r\n\r\n private _writeBetaWarning(output: DocSection): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n const betaWarning: string =\r\n 'This API is provided as a preview for developers and may change' +\r\n ' based on feedback that we receive. Do not use this API in a production environment.';\r\n output.appendNode(\r\n new DocNoteBox({ configuration }, [\r\n new DocParagraph({ configuration }, [new DocPlainText({ configuration, text: betaWarning })])\r\n ])\r\n );\r\n }\r\n\r\n private _appendSection(output: DocSection, docSection: DocSection): void {\r\n for (const node of docSection.nodes) {\r\n output.appendNode(node);\r\n }\r\n }\r\n\r\n private _appendAndMergeSection(output: DocSection, docSection: DocSection): void {\r\n let firstNode: boolean = true;\r\n for (const node of docSection.nodes) {\r\n if (firstNode) {\r\n if (node.kind === DocNodeKind.Paragraph) {\r\n output.appendNodesInParagraph(node.getChildNodes());\r\n firstNode = false;\r\n continue;\r\n }\r\n }\r\n firstNode = false;\r\n\r\n output.appendNode(node);\r\n }\r\n }\r\n\r\n private _getFilenameForApiItem(apiItem: ApiItem): string {\r\n if (apiItem.kind === ApiItemKind.Model) {\r\n return 'index.md';\r\n }\r\n\r\n let baseName: string = '';\r\n for (const hierarchyItem of apiItem.getHierarchy()) {\r\n // For overloaded methods, add a suffix such as \"MyClass.myMethod_2\".\r\n let qualifiedName: string = Utilities.getSafeFilenameForName(hierarchyItem.displayName);\r\n if (ApiParameterListMixin.isBaseClassOf(hierarchyItem)) {\r\n if (hierarchyItem.overloadIndex > 1) {\r\n // Subtract one for compatibility with earlier releases of API Documenter.\r\n // (This will get revamped when we fix GitHub issue #1308)\r\n qualifiedName += `_${hierarchyItem.overloadIndex - 1}`;\r\n }\r\n }\r\n\r\n switch (hierarchyItem.kind) {\r\n case ApiItemKind.Model:\r\n case ApiItemKind.EntryPoint:\r\n case ApiItemKind.EnumMember:\r\n break;\r\n case ApiItemKind.Package:\r\n baseName = Utilities.getSafeFilenameForName(PackageName.getUnscopedName(hierarchyItem.displayName));\r\n break;\r\n default:\r\n baseName += '.' + qualifiedName;\r\n }\r\n }\r\n return baseName + '.md';\r\n }\r\n\r\n private _getLinkFilenameForApiItem(apiItem: ApiItem): string {\r\n return './' + this._getFilenameForApiItem(apiItem);\r\n }\r\n\r\n private _deleteOldOutputFiles(): void {\r\n console.log('Deleting old output from ' + this._outputFolder);\r\n FileSystem.ensureEmptyFolder(this._outputFolder);\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"MarkdownDocumenter.js","sourceRoot":"","sources":["../../src/documenters/MarkdownDocumenter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;AAE3D,2CAA6B;AAC7B,oEAAoF;AACpF,4CAc0B;AAC1B,wEAuBwC;AAExC,kEAA4D;AAC5D,oDAAiD;AACjD,gDAA6C;AAC7C,8DAA2D;AAC3D,sDAAmD;AACnD,wDAAqD;AACrD,oDAAiD;AACjD,kDAA+C;AAC/C,6EAA0E;AA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W,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;AAtiCD,gDAsiCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport * as path from 'path';\r\nimport { PackageName, FileSystem, NewlineKind } from '@rushstack/node-core-library';\r\nimport {\r\n DocSection,\r\n DocPlainText,\r\n DocLinkTag,\r\n TSDocConfiguration,\r\n StringBuilder,\r\n DocNodeKind,\r\n DocParagraph,\r\n DocCodeSpan,\r\n DocFencedCode,\r\n StandardTags,\r\n DocBlock,\r\n DocComment,\r\n DocNodeContainer\r\n} from '@microsoft/tsdoc';\r\nimport {\r\n ApiModel,\r\n ApiItem,\r\n ApiEnum,\r\n ApiPackage,\r\n ApiItemKind,\r\n ApiReleaseTagMixin,\r\n ApiDocumentedItem,\r\n ApiClass,\r\n ReleaseTag,\r\n ApiStaticMixin,\r\n ApiPropertyItem,\r\n ApiInterface,\r\n Excerpt,\r\n ApiParameterListMixin,\r\n ApiReturnTypeMixin,\r\n ApiDeclaredItem,\r\n ApiNamespace,\r\n ExcerptTokenKind,\r\n IResolveDeclarationReferenceResult,\r\n ApiTypeAlias,\r\n ExcerptToken,\r\n ApiOptionalMixin\r\n} from '@microsoft/api-extractor-model';\r\n\r\nimport { CustomDocNodes } from '../nodes/CustomDocNodeKind';\r\nimport { DocHeading } from '../nodes/DocHeading';\r\nimport { DocTable } from '../nodes/DocTable';\r\nimport { DocEmphasisSpan } from '../nodes/DocEmphasisSpan';\r\nimport { DocTableRow } from '../nodes/DocTableRow';\r\nimport { DocTableCell } from '../nodes/DocTableCell';\r\nimport { DocNoteBox } from '../nodes/DocNoteBox';\r\nimport { Utilities } from '../utils/Utilities';\r\nimport { CustomMarkdownEmitter } from '../markdown/CustomMarkdownEmitter';\r\nimport { PluginLoader } from '../plugin/PluginLoader';\r\nimport {\r\n IMarkdownDocumenterFeatureOnBeforeWritePageArgs,\r\n MarkdownDocumenterFeatureContext\r\n} from '../plugin/MarkdownDocumenterFeature';\r\nimport { DocumenterConfig } from './DocumenterConfig';\r\nimport { MarkdownDocumenterAccessor } from '../plugin/MarkdownDocumenterAccessor';\r\n\r\nexport interface IMarkdownDocumenterOptions {\r\n apiModel: ApiModel;\r\n documenterConfig: DocumenterConfig | undefined;\r\n outputFolder: string;\r\n}\r\n\r\n/**\r\n * Renders API documentation in the Markdown file format.\r\n * For more info: https://en.wikipedia.org/wiki/Markdown\r\n */\r\nexport class MarkdownDocumenter {\r\n private readonly _apiModel: ApiModel;\r\n private readonly _documenterConfig: DocumenterConfig | undefined;\r\n private readonly _tsdocConfiguration: TSDocConfiguration;\r\n private readonly _markdownEmitter: CustomMarkdownEmitter;\r\n private readonly _outputFolder: string;\r\n private readonly _pluginLoader: PluginLoader;\r\n\r\n public constructor(options: IMarkdownDocumenterOptions) {\r\n this._apiModel = options.apiModel;\r\n this._documenterConfig = options.documenterConfig;\r\n this._outputFolder = options.outputFolder;\r\n this._tsdocConfiguration = CustomDocNodes.configuration;\r\n this._markdownEmitter = new CustomMarkdownEmitter(this._apiModel);\r\n\r\n this._pluginLoader = new PluginLoader();\r\n }\r\n\r\n public generateFiles(): void {\r\n if (this._documenterConfig) {\r\n this._pluginLoader.load(this._documenterConfig, () => {\r\n return new MarkdownDocumenterFeatureContext({\r\n apiModel: this._apiModel,\r\n outputFolder: this._outputFolder,\r\n documenter: new MarkdownDocumenterAccessor({\r\n getLinkForApiItem: (apiItem: ApiItem) => {\r\n return this._getLinkFilenameForApiItem(apiItem);\r\n }\r\n })\r\n });\r\n });\r\n }\r\n\r\n console.log();\r\n this._deleteOldOutputFiles();\r\n\r\n this._writeApiItemPage(this._apiModel);\r\n\r\n if (this._pluginLoader.markdownDocumenterFeature) {\r\n this._pluginLoader.markdownDocumenterFeature.onFinished({});\r\n }\r\n }\r\n\r\n private _writeApiItemPage(apiItem: ApiItem): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n const output: DocSection = new DocSection({ configuration: this._tsdocConfiguration });\r\n\r\n this._writeBreadcrumb(output, apiItem);\r\n\r\n const scopedName: string = apiItem.getScopedNameWithinPackage();\r\n\r\n switch (apiItem.kind) {\r\n case ApiItemKind.Class:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} class` }));\r\n break;\r\n case ApiItemKind.Enum:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} enum` }));\r\n break;\r\n case ApiItemKind.Interface:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} interface` }));\r\n break;\r\n case ApiItemKind.Constructor:\r\n case ApiItemKind.ConstructSignature:\r\n output.appendNode(new DocHeading({ configuration, title: scopedName }));\r\n break;\r\n case ApiItemKind.Method:\r\n case ApiItemKind.MethodSignature:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} method` }));\r\n break;\r\n case ApiItemKind.Function:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} function` }));\r\n break;\r\n case ApiItemKind.Model:\r\n output.appendNode(new DocHeading({ configuration, title: `API Reference` }));\r\n break;\r\n case ApiItemKind.Namespace:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} namespace` }));\r\n break;\r\n case ApiItemKind.Package:\r\n console.log(`Writing ${apiItem.displayName} package`);\r\n const unscopedPackageName: string = PackageName.getUnscopedName(apiItem.displayName);\r\n output.appendNode(new DocHeading({ configuration, title: `${unscopedPackageName} package` }));\r\n break;\r\n case ApiItemKind.Property:\r\n case ApiItemKind.PropertySignature:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} property` }));\r\n break;\r\n case ApiItemKind.TypeAlias:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} type` }));\r\n break;\r\n case ApiItemKind.Variable:\r\n output.appendNode(new DocHeading({ configuration, title: `${scopedName} variable` }));\r\n break;\r\n default:\r\n throw new Error('Unsupported API item kind: ' + apiItem.kind);\r\n }\r\n\r\n if (ApiReleaseTagMixin.isBaseClassOf(apiItem)) {\r\n if (apiItem.releaseTag === ReleaseTag.Beta) {\r\n this._writeBetaWarning(output);\r\n }\r\n }\r\n\r\n const decoratorBlocks: DocBlock[] = [];\r\n\r\n if (apiItem instanceof ApiDocumentedItem) {\r\n const tsdocComment: DocComment | undefined = apiItem.tsdocComment;\r\n\r\n if (tsdocComment) {\r\n decoratorBlocks.push(\r\n ...tsdocComment.customBlocks.filter(\r\n (block) => block.blockTag.tagNameWithUpperCase === StandardTags.decorator.tagNameWithUpperCase\r\n )\r\n );\r\n\r\n if (tsdocComment.deprecatedBlock) {\r\n output.appendNode(\r\n new DocNoteBox({ configuration: this._tsdocConfiguration }, [\r\n new DocParagraph({ configuration: this._tsdocConfiguration }, [\r\n new DocPlainText({\r\n configuration: this._tsdocConfiguration,\r\n text: 'Warning: This API is now obsolete. '\r\n })\r\n ]),\r\n ...tsdocComment.deprecatedBlock.content.nodes\r\n ])\r\n );\r\n }\r\n\r\n this._appendSection(output, tsdocComment.summarySection);\r\n }\r\n }\r\n\r\n if (apiItem instanceof ApiDeclaredItem) {\r\n if (apiItem.excerpt.text.length > 0) {\r\n output.appendNode(\r\n new DocParagraph({ configuration }, [\r\n new DocEmphasisSpan({ configuration, bold: true }, [\r\n new DocPlainText({ configuration, text: 'Signature:' })\r\n ])\r\n ])\r\n );\r\n output.appendNode(\r\n new DocFencedCode({\r\n configuration,\r\n code: apiItem.getExcerptWithModifiers(),\r\n language: 'typescript'\r\n })\r\n );\r\n }\r\n\r\n this._writeHeritageTypes(output, apiItem);\r\n }\r\n\r\n if (decoratorBlocks.length > 0) {\r\n output.appendNode(\r\n new DocParagraph({ configuration }, [\r\n new DocEmphasisSpan({ configuration, bold: true }, [\r\n new DocPlainText({ configuration, text: 'Decorators:' })\r\n ])\r\n ])\r\n );\r\n for (const decoratorBlock of decoratorBlocks) {\r\n output.appendNodes(decoratorBlock.content.nodes);\r\n }\r\n }\r\n\r\n let appendRemarks: boolean = true;\r\n switch (apiItem.kind) {\r\n case ApiItemKind.Class:\r\n case ApiItemKind.Interface:\r\n case ApiItemKind.Namespace:\r\n case ApiItemKind.Package:\r\n this._writeRemarksSection(output, apiItem);\r\n appendRemarks = false;\r\n break;\r\n }\r\n\r\n switch (apiItem.kind) {\r\n case ApiItemKind.Class:\r\n this._writeClassTables(output, apiItem as ApiClass);\r\n break;\r\n case ApiItemKind.Enum:\r\n this._writeEnumTables(output, apiItem as ApiEnum);\r\n break;\r\n case ApiItemKind.Interface:\r\n this._writeInterfaceTables(output, apiItem as ApiInterface);\r\n break;\r\n case ApiItemKind.Constructor:\r\n case ApiItemKind.ConstructSignature:\r\n case ApiItemKind.Method:\r\n case ApiItemKind.MethodSignature:\r\n case ApiItemKind.Function:\r\n this._writeParameterTables(output, apiItem as ApiParameterListMixin);\r\n this._writeThrowsSection(output, apiItem);\r\n break;\r\n case ApiItemKind.Namespace:\r\n this._writePackageOrNamespaceTables(output, apiItem as ApiNamespace);\r\n break;\r\n case ApiItemKind.Model:\r\n this._writeModelTable(output, apiItem as ApiModel);\r\n break;\r\n case ApiItemKind.Package:\r\n this._writePackageOrNamespaceTables(output, apiItem as ApiPackage);\r\n break;\r\n case ApiItemKind.Property:\r\n case ApiItemKind.PropertySignature:\r\n break;\r\n case ApiItemKind.TypeAlias:\r\n break;\r\n case ApiItemKind.Variable:\r\n break;\r\n default:\r\n throw new Error('Unsupported API item kind: ' + apiItem.kind);\r\n }\r\n\r\n if (appendRemarks) {\r\n this._writeRemarksSection(output, apiItem);\r\n }\r\n\r\n const filename: string = path.join(this._outputFolder, this._getFilenameForApiItem(apiItem));\r\n const stringBuilder: StringBuilder = new StringBuilder();\r\n\r\n stringBuilder.append(\r\n '<!-- Do not edit this file. It is automatically generated by API Documenter. -->\\n\\n'\r\n );\r\n\r\n this._markdownEmitter.emit(stringBuilder, output, {\r\n contextApiItem: apiItem,\r\n onGetFilenameForApiItem: (apiItemForFilename: ApiItem) => {\r\n return this._getLinkFilenameForApiItem(apiItemForFilename);\r\n }\r\n });\r\n\r\n let pageContent: string = stringBuilder.toString();\r\n\r\n if (this._pluginLoader.markdownDocumenterFeature) {\r\n // Allow the plugin to customize the pageContent\r\n const eventArgs: IMarkdownDocumenterFeatureOnBeforeWritePageArgs = {\r\n apiItem: apiItem,\r\n outputFilename: filename,\r\n pageContent: pageContent\r\n };\r\n this._pluginLoader.markdownDocumenterFeature.onBeforeWritePage(eventArgs);\r\n pageContent = eventArgs.pageContent;\r\n }\r\n\r\n FileSystem.writeFile(filename, pageContent, {\r\n convertLineEndings: this._documenterConfig ? this._documenterConfig.newlineKind : NewlineKind.CrLf\r\n });\r\n }\r\n\r\n private _writeHeritageTypes(output: DocSection, apiItem: ApiDeclaredItem): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n if (apiItem instanceof ApiClass) {\r\n if (apiItem.extendsType) {\r\n const extendsParagraph: DocParagraph = new DocParagraph({ configuration }, [\r\n new DocEmphasisSpan({ configuration, bold: true }, [\r\n new DocPlainText({ configuration, text: 'Extends: ' })\r\n ])\r\n ]);\r\n this._appendExcerptWithHyperlinks(extendsParagraph, apiItem.extendsType.excerpt);\r\n output.appendNode(extendsParagraph);\r\n }\r\n if (apiItem.implementsTypes.length > 0) {\r\n const extendsParagraph: DocParagraph = new DocParagraph({ configuration }, [\r\n new DocEmphasisSpan({ configuration, bold: true }, [\r\n new DocPlainText({ configuration, text: 'Implements: ' })\r\n ])\r\n ]);\r\n let needsComma: boolean = false;\r\n for (const implementsType of apiItem.implementsTypes) {\r\n if (needsComma) {\r\n extendsParagraph.appendNode(new DocPlainText({ configuration, text: ', ' }));\r\n }\r\n this._appendExcerptWithHyperlinks(extendsParagraph, implementsType.excerpt);\r\n needsComma = true;\r\n }\r\n output.appendNode(extendsParagraph);\r\n }\r\n }\r\n\r\n if (apiItem instanceof ApiInterface) {\r\n if (apiItem.extendsTypes.length > 0) {\r\n const extendsParagraph: DocParagraph = new DocParagraph({ configuration }, [\r\n new DocEmphasisSpan({ configuration, bold: true }, [\r\n new DocPlainText({ configuration, text: 'Extends: ' })\r\n ])\r\n ]);\r\n let needsComma: boolean = false;\r\n for (const extendsType of apiItem.extendsTypes) {\r\n if (needsComma) {\r\n extendsParagraph.appendNode(new DocPlainText({ configuration, text: ', ' }));\r\n }\r\n this._appendExcerptWithHyperlinks(extendsParagraph, extendsType.excerpt);\r\n needsComma = true;\r\n }\r\n output.appendNode(extendsParagraph);\r\n }\r\n }\r\n\r\n if (apiItem instanceof ApiTypeAlias) {\r\n const refs: ExcerptToken[] = apiItem.excerptTokens.filter(\r\n (token) =>\r\n token.kind === ExcerptTokenKind.Reference &&\r\n token.canonicalReference &&\r\n this._apiModel.resolveDeclarationReference(token.canonicalReference, undefined).resolvedApiItem\r\n );\r\n if (refs.length > 0) {\r\n const referencesParagraph: DocParagraph = new DocParagraph({ configuration }, [\r\n new DocEmphasisSpan({ configuration, bold: true }, [\r\n new DocPlainText({ configuration, text: 'References: ' })\r\n ])\r\n ]);\r\n let needsComma: boolean = false;\r\n const visited: Set<string> = new Set();\r\n for (const ref of refs) {\r\n if (visited.has(ref.text)) {\r\n continue;\r\n }\r\n visited.add(ref.text);\r\n\r\n if (needsComma) {\r\n referencesParagraph.appendNode(new DocPlainText({ configuration, text: ', ' }));\r\n }\r\n\r\n this._appendExcerptTokenWithHyperlinks(referencesParagraph, ref);\r\n needsComma = true;\r\n }\r\n output.appendNode(referencesParagraph);\r\n }\r\n }\r\n }\r\n\r\n private _writeRemarksSection(output: DocSection, apiItem: ApiItem): void {\r\n if (apiItem instanceof ApiDocumentedItem) {\r\n const tsdocComment: DocComment | undefined = apiItem.tsdocComment;\r\n\r\n if (tsdocComment) {\r\n // Write the @remarks block\r\n if (tsdocComment.remarksBlock) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Remarks' }));\r\n this._appendSection(output, tsdocComment.remarksBlock.content);\r\n }\r\n\r\n // Write the @example blocks\r\n const exampleBlocks: DocBlock[] = tsdocComment.customBlocks.filter(\r\n (x) => x.blockTag.tagNameWithUpperCase === StandardTags.example.tagNameWithUpperCase\r\n );\r\n\r\n let exampleNumber: number = 1;\r\n for (const exampleBlock of exampleBlocks) {\r\n const heading: string = exampleBlocks.length > 1 ? `Example ${exampleNumber}` : 'Example';\r\n\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: heading }));\r\n\r\n this._appendSection(output, exampleBlock.content);\r\n\r\n ++exampleNumber;\r\n }\r\n }\r\n }\r\n }\r\n\r\n private _writeThrowsSection(output: DocSection, apiItem: ApiItem): void {\r\n if (apiItem instanceof ApiDocumentedItem) {\r\n const tsdocComment: DocComment | undefined = apiItem.tsdocComment;\r\n\r\n if (tsdocComment) {\r\n // Write the @throws blocks\r\n const throwsBlocks: DocBlock[] = tsdocComment.customBlocks.filter(\r\n (x) => x.blockTag.tagNameWithUpperCase === StandardTags.throws.tagNameWithUpperCase\r\n );\r\n\r\n if (throwsBlocks.length > 0) {\r\n const heading: string = 'Exceptions';\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: heading }));\r\n\r\n for (const throwsBlock of throwsBlocks) {\r\n this._appendSection(output, throwsBlock.content);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * GENERATE PAGE: MODEL\r\n */\r\n private _writeModelTable(output: DocSection, apiModel: ApiModel): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const packagesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Package', 'Description']\r\n });\r\n\r\n for (const apiMember of apiModel.members) {\r\n const row: DocTableRow = new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ]);\r\n\r\n switch (apiMember.kind) {\r\n case ApiItemKind.Package:\r\n packagesTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n }\r\n }\r\n\r\n if (packagesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Packages' }));\r\n output.appendNode(packagesTable);\r\n }\r\n }\r\n\r\n /**\r\n * GENERATE PAGE: PACKAGE or NAMESPACE\r\n */\r\n private _writePackageOrNamespaceTables(output: DocSection, apiContainer: ApiPackage | ApiNamespace): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const classesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Class', 'Description']\r\n });\r\n\r\n const enumerationsTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Enumeration', 'Description']\r\n });\r\n\r\n const functionsTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Function', 'Description']\r\n });\r\n\r\n const interfacesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Interface', 'Description']\r\n });\r\n\r\n const namespacesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Namespace', 'Description']\r\n });\r\n\r\n const variablesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Variable', 'Description']\r\n });\r\n\r\n const typeAliasesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Type Alias', 'Description']\r\n });\r\n\r\n const apiMembers: ReadonlyArray<ApiItem> =\r\n apiContainer.kind === ApiItemKind.Package\r\n ? (apiContainer as ApiPackage).entryPoints[0].members\r\n : (apiContainer as ApiNamespace).members;\r\n\r\n for (const apiMember of apiMembers) {\r\n const row: DocTableRow = new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ]);\r\n\r\n switch (apiMember.kind) {\r\n case ApiItemKind.Class:\r\n classesTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n\r\n case ApiItemKind.Enum:\r\n enumerationsTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n\r\n case ApiItemKind.Interface:\r\n interfacesTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n\r\n case ApiItemKind.Namespace:\r\n namespacesTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n\r\n case ApiItemKind.Function:\r\n functionsTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n\r\n case ApiItemKind.TypeAlias:\r\n typeAliasesTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n\r\n case ApiItemKind.Variable:\r\n variablesTable.addRow(row);\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n }\r\n }\r\n\r\n if (classesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Classes' }));\r\n output.appendNode(classesTable);\r\n }\r\n\r\n if (enumerationsTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Enumerations' }));\r\n output.appendNode(enumerationsTable);\r\n }\r\n if (functionsTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Functions' }));\r\n output.appendNode(functionsTable);\r\n }\r\n\r\n if (interfacesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Interfaces' }));\r\n output.appendNode(interfacesTable);\r\n }\r\n\r\n if (namespacesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Namespaces' }));\r\n output.appendNode(namespacesTable);\r\n }\r\n\r\n if (variablesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Variables' }));\r\n output.appendNode(variablesTable);\r\n }\r\n\r\n if (typeAliasesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Type Aliases' }));\r\n output.appendNode(typeAliasesTable);\r\n }\r\n }\r\n\r\n /**\r\n * GENERATE PAGE: CLASS\r\n */\r\n private _writeClassTables(output: DocSection, apiClass: ApiClass): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const eventsTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Property', 'Modifiers', 'Type', 'Description']\r\n });\r\n\r\n const constructorsTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Constructor', 'Modifiers', 'Description']\r\n });\r\n\r\n const propertiesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Property', 'Modifiers', 'Type', 'Description']\r\n });\r\n\r\n const methodsTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Method', 'Modifiers', 'Description']\r\n });\r\n\r\n for (const apiMember of apiClass.members) {\r\n switch (apiMember.kind) {\r\n case ApiItemKind.Constructor: {\r\n constructorsTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createModifiersCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ])\r\n );\r\n\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n }\r\n case ApiItemKind.Method: {\r\n methodsTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createModifiersCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ])\r\n );\r\n\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n }\r\n case ApiItemKind.Property: {\r\n if ((apiMember as ApiPropertyItem).isEventProperty) {\r\n eventsTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createModifiersCell(apiMember),\r\n this._createPropertyTypeCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ])\r\n );\r\n } else {\r\n propertiesTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createModifiersCell(apiMember),\r\n this._createPropertyTypeCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ])\r\n );\r\n }\r\n\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (eventsTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Events' }));\r\n output.appendNode(eventsTable);\r\n }\r\n\r\n if (constructorsTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Constructors' }));\r\n output.appendNode(constructorsTable);\r\n }\r\n\r\n if (propertiesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Properties' }));\r\n output.appendNode(propertiesTable);\r\n }\r\n\r\n if (methodsTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Methods' }));\r\n output.appendNode(methodsTable);\r\n }\r\n }\r\n\r\n /**\r\n * GENERATE PAGE: ENUM\r\n */\r\n private _writeEnumTables(output: DocSection, apiEnum: ApiEnum): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const enumMembersTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Member', 'Value', 'Description']\r\n });\r\n\r\n for (const apiEnumMember of apiEnum.members) {\r\n enumMembersTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n new DocTableCell({ configuration }, [\r\n new DocParagraph({ configuration }, [\r\n new DocPlainText({ configuration, text: Utilities.getConciseSignature(apiEnumMember) })\r\n ])\r\n ]),\r\n\r\n new DocTableCell({ configuration }, [\r\n new DocParagraph({ configuration }, [\r\n new DocCodeSpan({ configuration, code: apiEnumMember.initializerExcerpt.text })\r\n ])\r\n ]),\r\n\r\n this._createDescriptionCell(apiEnumMember)\r\n ])\r\n );\r\n }\r\n\r\n if (enumMembersTable.rows.length > 0) {\r\n output.appendNode(\r\n new DocHeading({ configuration: this._tsdocConfiguration, title: 'Enumeration Members' })\r\n );\r\n output.appendNode(enumMembersTable);\r\n }\r\n }\r\n\r\n /**\r\n * GENERATE PAGE: INTERFACE\r\n */\r\n private _writeInterfaceTables(output: DocSection, apiClass: ApiInterface): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const eventsTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Property', 'Type', 'Description']\r\n });\r\n\r\n const propertiesTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Property', 'Type', 'Description']\r\n });\r\n\r\n const methodsTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Method', 'Description']\r\n });\r\n\r\n for (const apiMember of apiClass.members) {\r\n switch (apiMember.kind) {\r\n case ApiItemKind.ConstructSignature:\r\n case ApiItemKind.MethodSignature: {\r\n methodsTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ])\r\n );\r\n\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n }\r\n case ApiItemKind.PropertySignature: {\r\n if ((apiMember as ApiPropertyItem).isEventProperty) {\r\n eventsTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createPropertyTypeCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ])\r\n );\r\n } else {\r\n propertiesTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n this._createTitleCell(apiMember),\r\n this._createPropertyTypeCell(apiMember),\r\n this._createDescriptionCell(apiMember)\r\n ])\r\n );\r\n }\r\n\r\n this._writeApiItemPage(apiMember);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (eventsTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Events' }));\r\n output.appendNode(eventsTable);\r\n }\r\n\r\n if (propertiesTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Properties' }));\r\n output.appendNode(propertiesTable);\r\n }\r\n\r\n if (methodsTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Methods' }));\r\n output.appendNode(methodsTable);\r\n }\r\n }\r\n\r\n /**\r\n * GENERATE PAGE: FUNCTION-LIKE\r\n */\r\n private _writeParameterTables(output: DocSection, apiParameterListMixin: ApiParameterListMixin): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const parametersTable: DocTable = new DocTable({\r\n configuration,\r\n headerTitles: ['Parameter', 'Type', 'Description']\r\n });\r\n for (const apiParameter of apiParameterListMixin.parameters) {\r\n const parameterDescription: DocSection = new DocSection({ configuration });\r\n if (apiParameter.tsdocParamBlock) {\r\n this._appendSection(parameterDescription, apiParameter.tsdocParamBlock.content);\r\n }\r\n\r\n parametersTable.addRow(\r\n new DocTableRow({ configuration }, [\r\n new DocTableCell({ configuration }, [\r\n new DocParagraph({ configuration }, [\r\n new DocPlainText({ configuration, text: apiParameter.name })\r\n ])\r\n ]),\r\n new DocTableCell({ configuration }, [\r\n this._createParagraphForTypeExcerpt(apiParameter.parameterTypeExcerpt)\r\n ]),\r\n new DocTableCell({ configuration }, parameterDescription.nodes)\r\n ])\r\n );\r\n }\r\n\r\n if (parametersTable.rows.length > 0) {\r\n output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Parameters' }));\r\n output.appendNode(parametersTable);\r\n }\r\n\r\n if (ApiReturnTypeMixin.isBaseClassOf(apiParameterListMixin)) {\r\n const returnTypeExcerpt: Excerpt = apiParameterListMixin.returnTypeExcerpt;\r\n output.appendNode(\r\n new DocParagraph({ configuration }, [\r\n new DocEmphasisSpan({ configuration, bold: true }, [\r\n new DocPlainText({ configuration, text: 'Returns:' })\r\n ])\r\n ])\r\n );\r\n\r\n output.appendNode(this._createParagraphForTypeExcerpt(returnTypeExcerpt));\r\n\r\n if (apiParameterListMixin instanceof ApiDocumentedItem) {\r\n if (apiParameterListMixin.tsdocComment && apiParameterListMixin.tsdocComment.returnsBlock) {\r\n this._appendSection(output, apiParameterListMixin.tsdocComment.returnsBlock.content);\r\n }\r\n }\r\n }\r\n }\r\n\r\n private _createParagraphForTypeExcerpt(excerpt: Excerpt): DocParagraph {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const paragraph: DocParagraph = new DocParagraph({ configuration });\r\n\r\n if (!excerpt.text.trim()) {\r\n paragraph.appendNode(new DocPlainText({ configuration, text: '(not declared)' }));\r\n } else {\r\n this._appendExcerptWithHyperlinks(paragraph, excerpt);\r\n }\r\n\r\n return paragraph;\r\n }\r\n\r\n private _appendExcerptWithHyperlinks(docNodeContainer: DocNodeContainer, excerpt: Excerpt): void {\r\n for (const token of excerpt.spannedTokens) {\r\n this._appendExcerptTokenWithHyperlinks(docNodeContainer, token);\r\n }\r\n }\r\n\r\n private _appendExcerptTokenWithHyperlinks(docNodeContainer: DocNodeContainer, token: ExcerptToken): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n // Markdown doesn't provide a standardized syntax for hyperlinks inside code spans, so we will render\r\n // the type expression as DocPlainText. Instead of creating multiple DocParagraphs, we can simply\r\n // discard any newlines and let the renderer do normal word-wrapping.\r\n const unwrappedTokenText: string = token.text.replace(/[\\r\\n]+/g, ' ');\r\n\r\n // If it's hyperlinkable, then append a DocLinkTag\r\n if (token.kind === ExcerptTokenKind.Reference && token.canonicalReference) {\r\n const apiItemResult: IResolveDeclarationReferenceResult = this._apiModel.resolveDeclarationReference(\r\n token.canonicalReference,\r\n undefined\r\n );\r\n\r\n if (apiItemResult.resolvedApiItem) {\r\n docNodeContainer.appendNode(\r\n new DocLinkTag({\r\n configuration,\r\n tagName: '@link',\r\n linkText: unwrappedTokenText,\r\n urlDestination: this._getLinkFilenameForApiItem(apiItemResult.resolvedApiItem)\r\n })\r\n );\r\n return;\r\n }\r\n }\r\n\r\n // Otherwise append non-hyperlinked text\r\n docNodeContainer.appendNode(new DocPlainText({ configuration, text: unwrappedTokenText }));\r\n }\r\n\r\n private _createTitleCell(apiItem: ApiItem): DocTableCell {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n let linkText: string = Utilities.getConciseSignature(apiItem);\r\n if (ApiOptionalMixin.isBaseClassOf(apiItem) && apiItem.isOptional) {\r\n linkText += '?';\r\n }\r\n\r\n return new DocTableCell({ configuration }, [\r\n new DocParagraph({ configuration }, [\r\n new DocLinkTag({\r\n configuration,\r\n tagName: '@link',\r\n linkText: linkText,\r\n urlDestination: this._getLinkFilenameForApiItem(apiItem)\r\n })\r\n ])\r\n ]);\r\n }\r\n\r\n /**\r\n * This generates a DocTableCell for an ApiItem including the summary section and \"(BETA)\" annotation.\r\n *\r\n * @remarks\r\n * We mostly assume that the input is an ApiDocumentedItem, but it's easier to perform this as a runtime\r\n * check than to have each caller perform a type cast.\r\n */\r\n private _createDescriptionCell(apiItem: ApiItem): DocTableCell {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const section: DocSection = new DocSection({ configuration });\r\n\r\n if (ApiReleaseTagMixin.isBaseClassOf(apiItem)) {\r\n if (apiItem.releaseTag === ReleaseTag.Beta) {\r\n section.appendNodesInParagraph([\r\n new DocEmphasisSpan({ configuration, bold: true, italic: true }, [\r\n new DocPlainText({ configuration, text: '(BETA)' })\r\n ]),\r\n new DocPlainText({ configuration, text: ' ' })\r\n ]);\r\n }\r\n }\r\n\r\n if (ApiOptionalMixin.isBaseClassOf(apiItem) && apiItem.isOptional) {\r\n section.appendNodesInParagraph([\r\n new DocEmphasisSpan({ configuration, italic: true }, [\r\n new DocPlainText({ configuration, text: '(Optional)' })\r\n ]),\r\n new DocPlainText({ configuration, text: ' ' })\r\n ]);\r\n }\r\n\r\n if (apiItem instanceof ApiDocumentedItem) {\r\n if (apiItem.tsdocComment !== undefined) {\r\n this._appendAndMergeSection(section, apiItem.tsdocComment.summarySection);\r\n }\r\n }\r\n\r\n return new DocTableCell({ configuration }, section.nodes);\r\n }\r\n\r\n private _createModifiersCell(apiItem: ApiItem): DocTableCell {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const section: DocSection = new DocSection({ configuration });\r\n\r\n if (ApiStaticMixin.isBaseClassOf(apiItem)) {\r\n if (apiItem.isStatic) {\r\n section.appendNodeInParagraph(new DocCodeSpan({ configuration, code: 'static' }));\r\n }\r\n }\r\n\r\n return new DocTableCell({ configuration }, section.nodes);\r\n }\r\n\r\n private _createPropertyTypeCell(apiItem: ApiItem): DocTableCell {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n\r\n const section: DocSection = new DocSection({ configuration });\r\n\r\n if (apiItem instanceof ApiPropertyItem) {\r\n section.appendNode(this._createParagraphForTypeExcerpt(apiItem.propertyTypeExcerpt));\r\n }\r\n\r\n return new DocTableCell({ configuration }, section.nodes);\r\n }\r\n\r\n private _writeBreadcrumb(output: DocSection, apiItem: ApiItem): void {\r\n output.appendNodeInParagraph(\r\n new DocLinkTag({\r\n configuration: this._tsdocConfiguration,\r\n tagName: '@link',\r\n linkText: 'Home',\r\n urlDestination: this._getLinkFilenameForApiItem(this._apiModel)\r\n })\r\n );\r\n\r\n for (const hierarchyItem of apiItem.getHierarchy()) {\r\n switch (hierarchyItem.kind) {\r\n case ApiItemKind.Model:\r\n case ApiItemKind.EntryPoint:\r\n // We don't show the model as part of the breadcrumb because it is the root-level container.\r\n // We don't show the entry point because today API Extractor doesn't support multiple entry points;\r\n // this may change in the future.\r\n break;\r\n default:\r\n output.appendNodesInParagraph([\r\n new DocPlainText({\r\n configuration: this._tsdocConfiguration,\r\n text: ' > '\r\n }),\r\n new DocLinkTag({\r\n configuration: this._tsdocConfiguration,\r\n tagName: '@link',\r\n linkText: hierarchyItem.displayName,\r\n urlDestination: this._getLinkFilenameForApiItem(hierarchyItem)\r\n })\r\n ]);\r\n }\r\n }\r\n }\r\n\r\n private _writeBetaWarning(output: DocSection): void {\r\n const configuration: TSDocConfiguration = this._tsdocConfiguration;\r\n const betaWarning: string =\r\n 'This API is provided as a preview for developers and may change' +\r\n ' based on feedback that we receive. Do not use this API in a production environment.';\r\n output.appendNode(\r\n new DocNoteBox({ configuration }, [\r\n new DocParagraph({ configuration }, [new DocPlainText({ configuration, text: betaWarning })])\r\n ])\r\n );\r\n }\r\n\r\n private _appendSection(output: DocSection, docSection: DocSection): void {\r\n for (const node of docSection.nodes) {\r\n output.appendNode(node);\r\n }\r\n }\r\n\r\n private _appendAndMergeSection(output: DocSection, docSection: DocSection): void {\r\n let firstNode: boolean = true;\r\n for (const node of docSection.nodes) {\r\n if (firstNode) {\r\n if (node.kind === DocNodeKind.Paragraph) {\r\n output.appendNodesInParagraph(node.getChildNodes());\r\n firstNode = false;\r\n continue;\r\n }\r\n }\r\n firstNode = false;\r\n\r\n output.appendNode(node);\r\n }\r\n }\r\n\r\n private _getFilenameForApiItem(apiItem: ApiItem): string {\r\n if (apiItem.kind === ApiItemKind.Model) {\r\n return 'index.md';\r\n }\r\n\r\n let baseName: string = '';\r\n for (const hierarchyItem of apiItem.getHierarchy()) {\r\n // For overloaded methods, add a suffix such as \"MyClass.myMethod_2\".\r\n let qualifiedName: string = Utilities.getSafeFilenameForName(hierarchyItem.displayName);\r\n if (ApiParameterListMixin.isBaseClassOf(hierarchyItem)) {\r\n if (hierarchyItem.overloadIndex > 1) {\r\n // Subtract one for compatibility with earlier releases of API Documenter.\r\n // (This will get revamped when we fix GitHub issue #1308)\r\n qualifiedName += `_${hierarchyItem.overloadIndex - 1}`;\r\n }\r\n }\r\n\r\n switch (hierarchyItem.kind) {\r\n case ApiItemKind.Model:\r\n case ApiItemKind.EntryPoint:\r\n case ApiItemKind.EnumMember:\r\n break;\r\n case ApiItemKind.Package:\r\n baseName = Utilities.getSafeFilenameForName(PackageName.getUnscopedName(hierarchyItem.displayName));\r\n break;\r\n default:\r\n baseName += '.' + qualifiedName;\r\n }\r\n }\r\n return baseName + '.md';\r\n }\r\n\r\n private _getLinkFilenameForApiItem(apiItem: ApiItem): string {\r\n return './' + this._getFilenameForApiItem(apiItem);\r\n }\r\n\r\n private _deleteOldOutputFiles(): void {\r\n console.log('Deleting old output from ' + this._outputFolder);\r\n FileSystem.ensureEmptyFolder(this._outputFolder);\r\n }\r\n}\r\n"]}
|
|
@@ -104,7 +104,7 @@ class YamlDocumenter {
|
|
|
104
104
|
}
|
|
105
105
|
this._yamlReferences = savedYamlReferences;
|
|
106
106
|
const yamlFilePath = this._getYamlFilePath(outputFolder, apiItem);
|
|
107
|
-
if (apiItem.kind ===
|
|
107
|
+
if (apiItem.kind === api_extractor_model_1.ApiItemKind.Package) {
|
|
108
108
|
console.log('Writing ' + yamlFilePath);
|
|
109
109
|
}
|
|
110
110
|
this._writeYamlFile(newYamlFile, yamlFilePath, 'UniversalReference', yamlApiSchema);
|
|
@@ -121,7 +121,7 @@ class YamlDocumenter {
|
|
|
121
121
|
}
|
|
122
122
|
_getLogicalChildren(apiItem) {
|
|
123
123
|
const children = [];
|
|
124
|
-
if (apiItem.kind ===
|
|
124
|
+
if (apiItem.kind === api_extractor_model_1.ApiItemKind.Package) {
|
|
125
125
|
// Skip over the entry point, since it's not part of the documentation hierarchy
|
|
126
126
|
this._flattenNamespaces(apiItem.members[0].members, children, this.newDocfxNamespaces ? 0 /* NestedNamespacesAndChildren */ : 3 /* NestedChildren */);
|
|
127
127
|
}
|
|
@@ -139,7 +139,7 @@ class YamlDocumenter {
|
|
|
139
139
|
_flattenNamespaces(items, childrenOut, mode) {
|
|
140
140
|
let hasNonNamespaceChildren = false;
|
|
141
141
|
for (const item of items) {
|
|
142
|
-
if (item.kind ===
|
|
142
|
+
if (item.kind === api_extractor_model_1.ApiItemKind.Namespace) {
|
|
143
143
|
switch (mode) {
|
|
144
144
|
case 3 /* NestedChildren */:
|
|
145
145
|
// Include children of namespaces, but not the namespaces themselves. This matches existing legacy behavior.
|
|
@@ -196,7 +196,7 @@ class YamlDocumenter {
|
|
|
196
196
|
const tocItems = [];
|
|
197
197
|
for (const apiItem of apiItems) {
|
|
198
198
|
let tocItem;
|
|
199
|
-
if (apiItem.kind ===
|
|
199
|
+
if (apiItem.kind === api_extractor_model_1.ApiItemKind.Namespace && !this.newDocfxNamespaces) {
|
|
200
200
|
tocItem = {
|
|
201
201
|
name: this._getTocItemName(apiItem)
|
|
202
202
|
};
|
|
@@ -223,7 +223,7 @@ class YamlDocumenter {
|
|
|
223
223
|
/** @virtual */
|
|
224
224
|
_getTocItemName(apiItem) {
|
|
225
225
|
let name;
|
|
226
|
-
if (apiItem.kind ===
|
|
226
|
+
if (apiItem.kind === api_extractor_model_1.ApiItemKind.Package) {
|
|
227
227
|
name = node_core_library_1.PackageName.getUnscopedName(apiItem.displayName);
|
|
228
228
|
}
|
|
229
229
|
else {
|
|
@@ -236,12 +236,12 @@ class YamlDocumenter {
|
|
|
236
236
|
}
|
|
237
237
|
_shouldEmbed(apiItemKind) {
|
|
238
238
|
switch (apiItemKind) {
|
|
239
|
-
case
|
|
240
|
-
case
|
|
241
|
-
case
|
|
242
|
-
case
|
|
239
|
+
case api_extractor_model_1.ApiItemKind.Class:
|
|
240
|
+
case api_extractor_model_1.ApiItemKind.Package:
|
|
241
|
+
case api_extractor_model_1.ApiItemKind.Interface:
|
|
242
|
+
case api_extractor_model_1.ApiItemKind.Enum:
|
|
243
243
|
return false;
|
|
244
|
-
case
|
|
244
|
+
case api_extractor_model_1.ApiItemKind.Namespace:
|
|
245
245
|
return !this.newDocfxNamespaces;
|
|
246
246
|
}
|
|
247
247
|
return true;
|
|
@@ -249,9 +249,9 @@ class YamlDocumenter {
|
|
|
249
249
|
_shouldInclude(apiItemKind) {
|
|
250
250
|
// Filter out known items that are not yet supported
|
|
251
251
|
switch (apiItemKind) {
|
|
252
|
-
case
|
|
253
|
-
case
|
|
254
|
-
case
|
|
252
|
+
case api_extractor_model_1.ApiItemKind.CallSignature:
|
|
253
|
+
case api_extractor_model_1.ApiItemKind.ConstructSignature:
|
|
254
|
+
case api_extractor_model_1.ApiItemKind.IndexSignature:
|
|
255
255
|
return false;
|
|
256
256
|
}
|
|
257
257
|
return true;
|
|
@@ -299,48 +299,48 @@ class YamlDocumenter {
|
|
|
299
299
|
yamlItem.langs = ['typeScript'];
|
|
300
300
|
// Add the namespace of the item if it is contained in one.
|
|
301
301
|
// Do not add the namespace parent of a namespace as they are flattened in the documentation.
|
|
302
|
-
if (apiItem.kind !==
|
|
302
|
+
if (apiItem.kind !== api_extractor_model_1.ApiItemKind.Namespace &&
|
|
303
303
|
apiItem.parent &&
|
|
304
|
-
apiItem.parent.kind ===
|
|
304
|
+
apiItem.parent.kind === api_extractor_model_1.ApiItemKind.Namespace &&
|
|
305
305
|
this.newDocfxNamespaces) {
|
|
306
306
|
yamlItem.namespace = apiItem.parent.canonicalReference.toString();
|
|
307
307
|
}
|
|
308
308
|
switch (apiItem.kind) {
|
|
309
|
-
case
|
|
309
|
+
case api_extractor_model_1.ApiItemKind.Enum:
|
|
310
310
|
yamlItem.type = 'enum';
|
|
311
311
|
break;
|
|
312
|
-
case
|
|
312
|
+
case api_extractor_model_1.ApiItemKind.EnumMember:
|
|
313
313
|
yamlItem.type = 'field';
|
|
314
314
|
const enumMember = apiItem;
|
|
315
315
|
if (enumMember.initializerExcerpt.text.length > 0) {
|
|
316
316
|
yamlItem.numericValue = enumMember.initializerExcerpt.text;
|
|
317
317
|
}
|
|
318
318
|
break;
|
|
319
|
-
case
|
|
319
|
+
case api_extractor_model_1.ApiItemKind.Class:
|
|
320
320
|
yamlItem.type = 'class';
|
|
321
321
|
this._populateYamlClassOrInterface(uid, yamlItem, apiItem);
|
|
322
322
|
break;
|
|
323
|
-
case
|
|
323
|
+
case api_extractor_model_1.ApiItemKind.Interface:
|
|
324
324
|
yamlItem.type = 'interface';
|
|
325
325
|
this._populateYamlClassOrInterface(uid, yamlItem, apiItem);
|
|
326
326
|
break;
|
|
327
|
-
case
|
|
328
|
-
case
|
|
327
|
+
case api_extractor_model_1.ApiItemKind.Method:
|
|
328
|
+
case api_extractor_model_1.ApiItemKind.MethodSignature:
|
|
329
329
|
yamlItem.type = 'method';
|
|
330
330
|
this._populateYamlFunctionLike(uid, yamlItem, apiItem);
|
|
331
331
|
break;
|
|
332
|
-
case
|
|
332
|
+
case api_extractor_model_1.ApiItemKind.Constructor:
|
|
333
333
|
yamlItem.type = 'constructor';
|
|
334
334
|
this._populateYamlFunctionLike(uid, yamlItem, apiItem);
|
|
335
335
|
break;
|
|
336
|
-
case
|
|
336
|
+
case api_extractor_model_1.ApiItemKind.Package:
|
|
337
337
|
yamlItem.type = 'package';
|
|
338
338
|
break;
|
|
339
|
-
case
|
|
339
|
+
case api_extractor_model_1.ApiItemKind.Namespace:
|
|
340
340
|
yamlItem.type = 'namespace';
|
|
341
341
|
break;
|
|
342
|
-
case
|
|
343
|
-
case
|
|
342
|
+
case api_extractor_model_1.ApiItemKind.Property:
|
|
343
|
+
case api_extractor_model_1.ApiItemKind.PropertySignature:
|
|
344
344
|
const apiProperty = apiItem;
|
|
345
345
|
if (apiProperty.isEventProperty) {
|
|
346
346
|
yamlItem.type = 'event';
|
|
@@ -350,22 +350,22 @@ class YamlDocumenter {
|
|
|
350
350
|
}
|
|
351
351
|
this._populateYamlProperty(uid, yamlItem, apiProperty);
|
|
352
352
|
break;
|
|
353
|
-
case
|
|
353
|
+
case api_extractor_model_1.ApiItemKind.Function:
|
|
354
354
|
yamlItem.type = 'function';
|
|
355
355
|
this._populateYamlFunctionLike(uid, yamlItem, apiItem);
|
|
356
356
|
break;
|
|
357
|
-
case
|
|
357
|
+
case api_extractor_model_1.ApiItemKind.Variable:
|
|
358
358
|
yamlItem.type = 'variable';
|
|
359
359
|
this._populateYamlVariable(uid, yamlItem, apiItem);
|
|
360
360
|
break;
|
|
361
|
-
case
|
|
361
|
+
case api_extractor_model_1.ApiItemKind.TypeAlias:
|
|
362
362
|
yamlItem.type = 'typealias';
|
|
363
363
|
this._populateYamlTypeAlias(uid, yamlItem, apiItem);
|
|
364
364
|
break;
|
|
365
365
|
default:
|
|
366
366
|
throw new Error('Unimplemented item kind: ' + apiItem.kind);
|
|
367
367
|
}
|
|
368
|
-
if (apiItem.kind !==
|
|
368
|
+
if (apiItem.kind !== api_extractor_model_1.ApiItemKind.Package && !this._shouldEmbed(apiItem.kind)) {
|
|
369
369
|
const associatedPackage = apiItem.getAssociatedPackage();
|
|
370
370
|
if (!associatedPackage) {
|
|
371
371
|
throw new Error('Unable to determine associated package for ' + apiItem.displayName);
|
|
@@ -419,7 +419,7 @@ class YamlDocumenter {
|
|
|
419
419
|
if (apiItem.tsdocComment) {
|
|
420
420
|
if (apiItem.tsdocComment.modifierTagSet.isSealed()) {
|
|
421
421
|
let sealedMessage;
|
|
422
|
-
if (apiItem.kind ===
|
|
422
|
+
if (apiItem.kind === api_extractor_model_1.ApiItemKind.Class) {
|
|
423
423
|
sealedMessage = 'This class is marked as `@sealed`. Subclasses should not extend it.';
|
|
424
424
|
}
|
|
425
425
|
else {
|
|
@@ -620,7 +620,7 @@ class YamlDocumenter {
|
|
|
620
620
|
}
|
|
621
621
|
// Remove the last token if it consists only of whitespace
|
|
622
622
|
const lastToken = excerptTokens[excerptTokens.length - 1];
|
|
623
|
-
if (lastToken.kind ===
|
|
623
|
+
if (lastToken.kind === api_extractor_model_1.ExcerptTokenKind.Content && !lastToken.text.trim()) {
|
|
624
624
|
excerptTokens.pop();
|
|
625
625
|
if (excerptTokens.length === 0) {
|
|
626
626
|
return '';
|
|
@@ -628,7 +628,7 @@ class YamlDocumenter {
|
|
|
628
628
|
}
|
|
629
629
|
const typeName = typeExcerpt.text.trim();
|
|
630
630
|
// If there are no references to be used for a complex type, return the type name.
|
|
631
|
-
if (!excerptTokens.some((tok) => tok.kind ===
|
|
631
|
+
if (!excerptTokens.some((tok) => tok.kind === api_extractor_model_1.ExcerptTokenKind.Reference && !!tok.canonicalReference)) {
|
|
632
632
|
return typeName;
|
|
633
633
|
}
|
|
634
634
|
const yamlReferences = this._ensureYamlReferences();
|
|
@@ -639,7 +639,7 @@ class YamlDocumenter {
|
|
|
639
639
|
}
|
|
640
640
|
// If the excerpt consists of a single reference token, record the reference.
|
|
641
641
|
if (excerptTokens.length === 1 &&
|
|
642
|
-
excerptTokens[0].kind ===
|
|
642
|
+
excerptTokens[0].kind === api_extractor_model_1.ExcerptTokenKind.Reference &&
|
|
643
643
|
excerptTokens[0].canonicalReference) {
|
|
644
644
|
const excerptRef = excerptTokens[0].canonicalReference.toString();
|
|
645
645
|
const apiItem = this._apiItemsByCanonicalReference.get(excerptRef);
|
|
@@ -667,7 +667,7 @@ class YamlDocumenter {
|
|
|
667
667
|
const specs = [];
|
|
668
668
|
if (excerptTokens) {
|
|
669
669
|
for (const token of excerptTokens) {
|
|
670
|
-
if (token.kind ===
|
|
670
|
+
if (token.kind === api_extractor_model_1.ExcerptTokenKind.Reference) {
|
|
671
671
|
const spec = {};
|
|
672
672
|
const specUid = token.canonicalReference && token.canonicalReference.toString();
|
|
673
673
|
const apiItem = specUid
|
|
@@ -722,9 +722,9 @@ class YamlDocumenter {
|
|
|
722
722
|
_getYamlItemName(apiItem, options = {}) {
|
|
723
723
|
const { includeSignature, includeNamespace } = options;
|
|
724
724
|
const baseName = includeSignature ? Utilities_1.Utilities.getConciseSignature(apiItem) : apiItem.displayName;
|
|
725
|
-
if ((includeNamespace || apiItem.kind ===
|
|
725
|
+
if ((includeNamespace || apiItem.kind === api_extractor_model_1.ApiItemKind.Namespace) &&
|
|
726
726
|
apiItem.parent &&
|
|
727
|
-
apiItem.parent.kind ===
|
|
727
|
+
apiItem.parent.kind === api_extractor_model_1.ApiItemKind.Namespace) {
|
|
728
728
|
// If the immediate parent is a namespace, then add the namespaces to the name. For example:
|
|
729
729
|
//
|
|
730
730
|
// // Name: "N1"
|
|
@@ -753,7 +753,7 @@ class YamlDocumenter {
|
|
|
753
753
|
// flattened into the package's page.
|
|
754
754
|
const nameParts = [baseName];
|
|
755
755
|
for (let current = apiItem.parent; current; current = current.parent) {
|
|
756
|
-
if (current.kind !==
|
|
756
|
+
if (current.kind !== api_extractor_model_1.ApiItemKind.Namespace) {
|
|
757
757
|
break;
|
|
758
758
|
}
|
|
759
759
|
nameParts.unshift(current.displayName);
|
|
@@ -768,14 +768,14 @@ class YamlDocumenter {
|
|
|
768
768
|
let result = '';
|
|
769
769
|
for (const current of apiItem.getHierarchy()) {
|
|
770
770
|
switch (current.kind) {
|
|
771
|
-
case
|
|
772
|
-
case
|
|
771
|
+
case api_extractor_model_1.ApiItemKind.Model:
|
|
772
|
+
case api_extractor_model_1.ApiItemKind.EntryPoint:
|
|
773
773
|
break;
|
|
774
|
-
case
|
|
774
|
+
case api_extractor_model_1.ApiItemKind.Package:
|
|
775
775
|
result += Utilities_1.Utilities.getSafeFilenameForName(node_core_library_1.PackageName.getUnscopedName(current.displayName));
|
|
776
776
|
break;
|
|
777
777
|
default:
|
|
778
|
-
if (current.parent && current.parent.kind ===
|
|
778
|
+
if (current.parent && current.parent.kind === api_extractor_model_1.ApiItemKind.EntryPoint) {
|
|
779
779
|
result += '/';
|
|
780
780
|
}
|
|
781
781
|
else {
|