Merge pull request #8266 from backstage/rugvip/packageindex
scripts/api-extractor: fix package index descriptions
This commit is contained in:
@@ -35,6 +35,7 @@ import {
|
||||
import { Program } from 'typescript';
|
||||
import {
|
||||
DocNode,
|
||||
DocSection,
|
||||
IDocNodeContainerParameters,
|
||||
TSDocTagSyntaxKind,
|
||||
} from '@microsoft/tsdoc';
|
||||
@@ -50,6 +51,7 @@ import { DocHeading } from '@microsoft/api-documenter/lib/nodes/DocHeading';
|
||||
import { CustomMarkdownEmitter } from '@microsoft/api-documenter/lib/markdown/CustomMarkdownEmitter';
|
||||
import { IMarkdownEmitterContext } from '@microsoft/api-documenter/lib/markdown/MarkdownEmitter';
|
||||
import { AstDeclaration } from '@microsoft/api-extractor/lib/analyzer/AstDeclaration';
|
||||
import { DocTableCell } from '@microsoft/api-documenter/lib/nodes/DocTableCell';
|
||||
|
||||
const tmpDir = resolvePath(__dirname, '../node_modules/.cache/api-extractor');
|
||||
|
||||
@@ -603,9 +605,18 @@ async function buildDocs({
|
||||
});
|
||||
|
||||
for (const apiMember of apiModel.members) {
|
||||
// This is a workaround for this check failing: https://github.com/microsoft/rushstack/blob/915aca8d8847b65981892f44f0544ccb00752792/apps/api-documenter/src/documenters/MarkdownDocumenter.ts#L991
|
||||
const description = new DocSection({ configuration });
|
||||
if (apiMember.tsdocComment !== undefined) {
|
||||
this._appendAndMergeSection(
|
||||
description,
|
||||
apiMember.tsdocComment.summarySection,
|
||||
);
|
||||
}
|
||||
|
||||
const row = new DocTableRow({ configuration }, [
|
||||
this._createTitleCell(apiMember),
|
||||
this._createDescriptionCell(apiMember),
|
||||
new DocTableCell({ configuration }, description.nodes),
|
||||
]);
|
||||
|
||||
if (apiMember.kind === 'Package') {
|
||||
|
||||
Reference in New Issue
Block a user