@microsoft/api-extractor 7.52.3 → 7.52.4
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 +12 -0
- package/CHANGELOG.md +8 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/analyzer/Span.js +2 -2
- package/lib/analyzer/Span.js.map +1 -1
- package/lib/api/CompilerState.js +1 -1
- package/lib/api/CompilerState.js.map +1 -1
- package/lib/api/ExtractorConfig.js +5 -2
- package/lib/api/ExtractorConfig.js.map +1 -1
- package/lib/collector/SourceMapper.js +5 -2
- package/lib/collector/SourceMapper.js.map +1 -1
- package/lib/generators/ApiModelGenerator.js +20 -5
- package/lib/generators/ApiModelGenerator.js.map +1 -1
- package/lib/generators/ApiReportGenerator.js +1 -12
- package/lib/generators/ApiReportGenerator.js.map +1 -1
- package/package.json +4 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiModelGenerator.js","sourceRoot":"","sources":["../../src/generators/ApiModelGenerator.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,+BAA+B;AAE/B,2CAA6B;AAC7B,+CAAiC;AAEjC,wEA2BwC;AACxC,oEAAoD;AAKpD,qDAAqF;AACrF,qDAAkD;AAClD,mFAAgF;AAGhF,uEAAoE;AAGpE,yEAAsE;AAmBtE,MAAa,iBAAiB;IAQ5B,YAAmB,SAAoB,EAAE,eAAgC;QACvE,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,8BAAQ,EAAE,CAAC;QAChC,IAAI,CAAC,mBAAmB,GAAG,IAAI,6DAA6B,CAAC,SAAS,CAAC,CAAC;QAExE,MAAM,yBAAyB,GAC7B,eAAe,CAAC,yBAAyB,CAAC;QAC5C,IAAI,yBAAyB,EAAE,CAAC;YAC9B,IAAI,CAAC,kBA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UAAU,CAAC;YACxF,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACR,oEAAoE;gBACpE,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;IACH,CAAC;IAEO,eAAe,CAAC,WAA2B;QACjD,MAAM,UAAU,GAAkB,WAAW,CAAC,aAAa,EAAE,CAAC;QAC9D,MAAM,cAAc,GAAoB,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,iBAAiB,CAAC;YACrF,UAAU;YACV,GAAG,EAAE,WAAW,CAAC,GAAG;SACrB,CAAC,CAAC;QAEH,IAAI,MAAM,GAAW,IAAI,CAAC,QAAQ,CAChC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,aAAa,EAC7C,cAAc,CAAC,cAAc,CAC9B,CAAC;QACF,MAAM,GAAG,wBAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;QACvC,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAxmCD,8CAwmCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n/* eslint-disable no-bitwise */\n\nimport * as path from 'path';\nimport * as ts from 'typescript';\nimport type * as tsdoc from '@microsoft/tsdoc';\nimport {\n ApiModel,\n ApiClass,\n ApiPackage,\n ApiEntryPoint,\n ApiMethod,\n ApiNamespace,\n ApiInterface,\n ApiPropertySignature,\n type ApiItemContainerMixin,\n ReleaseTag,\n ApiProperty,\n ApiMethodSignature,\n type IApiParameterOptions,\n ApiEnum,\n ApiEnumMember,\n type IExcerptTokenRange,\n type IExcerptToken,\n ApiConstructor,\n ApiConstructSignature,\n ApiFunction,\n ApiIndexSignature,\n ApiVariable,\n ApiTypeAlias,\n ApiCallSignature,\n type IApiTypeParameterOptions,\n EnumMemberOrder\n} from '@microsoft/api-extractor-model';\nimport { Path } from '@rushstack/node-core-library';\n\nimport type { Collector } from '../collector/Collector';\nimport type { ISourceLocation } from '../collector/SourceMapper';\nimport type { AstDeclaration } from '../analyzer/AstDeclaration';\nimport { ExcerptBuilder, type IExcerptBuilderNodeToCapture } from './ExcerptBuilder';\nimport { AstSymbol } from '../analyzer/AstSymbol';\nimport { DeclarationReferenceGenerator } from './DeclarationReferenceGenerator';\nimport type { ApiItemMetadata } from '../collector/ApiItemMetadata';\nimport type { DeclarationMetadata } from '../collector/DeclarationMetadata';\nimport { AstNamespaceImport } from '../analyzer/AstNamespaceImport';\nimport type { AstEntity } from '../analyzer/AstEntity';\nimport type { AstModule } from '../analyzer/AstModule';\nimport { TypeScriptInternals } from '../analyzer/TypeScriptInternals';\nimport type { ExtractorConfig } from '../api/ExtractorConfig';\n\ninterface IProcessAstEntityContext {\n name: string;\n isExported: boolean;\n parentApiItem: ApiItemContainerMixin;\n}\n\n/**\n * @beta\n */\nexport interface IApiModelGenerationOptions {\n /**\n * The release tags to trim.\n */\n releaseTagsToTrim: Set<ReleaseTag>;\n}\n\nexport class ApiModelGenerator {\n private readonly _collector: Collector;\n private readonly _apiModel: ApiModel;\n private readonly _referenceGenerator: DeclarationReferenceGenerator;\n private readonly _releaseTagsToTrim: Set<ReleaseTag> | undefined;\n\n public readonly docModelEnabled: boolean;\n\n public constructor(collector: Collector, extractorConfig: ExtractorConfig) {\n this._collector = collector;\n this._apiModel = new ApiModel();\n this._referenceGenerator = new DeclarationReferenceGenerator(collector);\n\n const apiModelGenerationOptions: IApiModelGenerationOptions | undefined =\n extractorConfig.docModelGenerationOptions;\n if (apiModelGenerationOptions) {\n this._releaseTagsToTrim = apiModelGenerationOptions.releaseTagsToTrim;\n this.docModelEnabled = true;\n } else {\n this.docModelEnabled = false;\n }\n }\n\n public get apiModel(): ApiModel {\n return this._apiModel;\n }\n\n public buildApiPackage(): ApiPackage {\n const packageDocComment: tsdoc.DocComment | undefined = this._collector.workingPackage.tsdocComment;\n\n const apiPackage: ApiPackage = new ApiPackage({\n name: this._collector.workingPackage.name,\n docComment: packageDocComment,\n tsdocConfiguration: this._collector.extractorConfig.tsdocConfiguration,\n projectFolderUrl: this._collector.extractorConfig.projectFolderUrl\n });\n this._apiModel.addMember(apiPackage);\n\n const apiEntryPoint: ApiEntryPoint = new ApiEntryPoint({ name: '' });\n apiPackage.addMember(apiEntryPoint);\n\n for (const entity of this._collector.entities) {\n // Only process entities that are exported from the entry point. Entities that are exported from\n // `AstNamespaceImport` entities will be processed by `_processAstNamespaceImport`. However, if\n // we are including forgotten exports, then process everything.\n if (entity.exportedFromEntryPoint || this._collector.extractorConfig.docModelIncludeForgottenExports) {\n this._processAstEntity(entity.astEntity, {\n name: entity.nameForEmit!,\n isExported: entity.exportedFromEntryPoint,\n parentApiItem: apiEntryPoint\n });\n }\n }\n\n return apiPackage;\n }\n\n private _processAstEntity(astEntity: AstEntity, context: IProcessAstEntityContext): void {\n if (astEntity instanceof AstSymbol) {\n // Skip ancillary declarations; we will process them with the main declaration\n for (const astDeclaration of this._collector.getNonAncillaryDeclarations(astEntity)) {\n this._processDeclaration(astDeclaration, context);\n }\n return;\n }\n\n if (astEntity instanceof AstNamespaceImport) {\n // Note that a single API item can belong to two different AstNamespaceImport namespaces. For example:\n //\n // // file.ts defines \"thing()\"\n // import * as example1 from \"./file\";\n // import * as example2 from \"./file\";\n //\n // // ...so here we end up with example1.thing() and example2.thing()\n // export { example1, example2 }\n //\n // The current logic does not try to associate \"thing()\" with a specific parent. Instead\n // the API documentation will show duplicated entries for example1.thing() and example2.thing().\n //\n // This could be improved in the future, but it requires a stable mechanism for choosing an associated parent.\n // For thoughts about this: https://github.com/microsoft/rushstack/issues/1308\n this._processAstNamespaceImport(astEntity, context);\n return;\n }\n\n // TODO: Figure out how to represent reexported AstImport objects. Basically we need to introduce a new\n // ApiItem subclass for \"export alias\", similar to a type alias, but representing declarations of the\n // form \"export { X } from 'external-package'\". We can also use this to solve GitHub issue #950.\n }\n\n private _processAstNamespaceImport(\n astNamespaceImport: AstNamespaceImport,\n context: IProcessAstEntityContext\n ): void {\n const astModule: AstModule = astNamespaceImport.astModule;\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiNamespace.getContainerKey(name);\n const fileUrlPath: string = this._getFileUrlPath(astNamespaceImport.declaration);\n\n let apiNamespace: ApiNamespace | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiNamespace;\n\n if (apiNamespace === undefined) {\n apiNamespace = new ApiNamespace({\n name,\n docComment: undefined,\n releaseTag: ReleaseTag.None,\n excerptTokens: [],\n isExported,\n fileUrlPath\n });\n parentApiItem.addMember(apiNamespace);\n }\n\n astModule.astModuleExportInfo!.exportedLocalEntities.forEach(\n (exportedEntity: AstEntity, exportedName: string) => {\n this._processAstEntity(exportedEntity, {\n name: exportedName,\n isExported: true,\n parentApiItem: apiNamespace!\n });\n }\n );\n }\n\n private _processDeclaration(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n if ((astDeclaration.modifierFlags & ts.ModifierFlags.Private) !== 0) {\n return; // trim out private declarations\n }\n\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n if (this._releaseTagsToTrim?.has(releaseTag)) {\n return;\n }\n\n switch (astDeclaration.declaration.kind) {\n case ts.SyntaxKind.CallSignature:\n this._processApiCallSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.Constructor:\n this._processApiConstructor(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.ConstructSignature:\n this._processApiConstructSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.ClassDeclaration:\n this._processApiClass(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.EnumDeclaration:\n this._processApiEnum(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.EnumMember:\n this._processApiEnumMember(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.FunctionDeclaration:\n this._processApiFunction(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.GetAccessor:\n this._processApiProperty(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.SetAccessor:\n this._processApiProperty(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.IndexSignature:\n this._processApiIndexSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.InterfaceDeclaration:\n this._processApiInterface(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.MethodDeclaration:\n this._processApiMethod(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.MethodSignature:\n this._processApiMethodSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.ModuleDeclaration:\n this._processApiNamespace(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.PropertyDeclaration:\n this._processApiProperty(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.PropertySignature:\n this._processApiPropertySignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.TypeAliasDeclaration:\n this._processApiTypeAlias(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.VariableDeclaration:\n // check for arrow functions in variable declaration\n const functionDeclaration: ts.FunctionDeclaration | undefined =\n this._tryFindFunctionDeclaration(astDeclaration);\n if (functionDeclaration) {\n this._processApiFunction(astDeclaration, context, functionDeclaration);\n } else {\n this._processApiVariable(astDeclaration, context);\n }\n break;\n\n default:\n // ignore unknown types\n }\n }\n\n private _tryFindFunctionDeclaration(astDeclaration: AstDeclaration): ts.FunctionDeclaration | undefined {\n const children: readonly ts.Node[] = astDeclaration.declaration.getChildren(\n astDeclaration.declaration.getSourceFile()\n );\n return children.find(ts.isFunctionTypeNode) as ts.FunctionDeclaration | undefined;\n }\n\n private _processChildDeclarations(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n for (const childDeclaration of astDeclaration.children) {\n this._processDeclaration(childDeclaration, {\n ...context,\n name: childDeclaration.astSymbol.localName\n });\n }\n }\n\n private _processApiCallSignature(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiCallSignature.getContainerKey(overloadIndex);\n\n let apiCallSignature: ApiCallSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiCallSignature;\n\n if (apiCallSignature === undefined) {\n const callSignature: ts.CallSignatureDeclaration =\n astDeclaration.declaration as ts.CallSignatureDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: callSignature.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n callSignature.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n callSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(callSignature);\n\n apiCallSignature = new ApiCallSignature({\n docComment,\n releaseTag,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiCallSignature);\n }\n }\n\n private _processApiConstructor(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiConstructor.getContainerKey(overloadIndex);\n\n let apiConstructor: ApiConstructor | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiConstructor;\n\n if (apiConstructor === undefined) {\n const constructorDeclaration: ts.ConstructorDeclaration =\n astDeclaration.declaration as ts.ConstructorDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n constructorDeclaration.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isProtected: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Protected) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(constructorDeclaration);\n\n apiConstructor = new ApiConstructor({\n docComment,\n releaseTag,\n isProtected,\n parameters,\n overloadIndex,\n excerptTokens,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiConstructor);\n }\n }\n\n private _processApiClass(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiClass.getContainerKey(name);\n\n let apiClass: ApiClass | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiClass;\n\n if (apiClass === undefined) {\n const classDeclaration: ts.ClassDeclaration = astDeclaration.declaration as ts.ClassDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n classDeclaration.typeParameters\n );\n\n let extendsTokenRange: IExcerptTokenRange | undefined = undefined;\n const implementsTokenRanges: IExcerptTokenRange[] = [];\n\n for (const heritageClause of classDeclaration.heritageClauses || []) {\n if (heritageClause.token === ts.SyntaxKind.ExtendsKeyword) {\n extendsTokenRange = ExcerptBuilder.createEmptyTokenRange();\n if (heritageClause.types.length > 0) {\n nodesToCapture.push({ node: heritageClause.types[0], tokenRange: extendsTokenRange });\n }\n } else if (heritageClause.token === ts.SyntaxKind.ImplementsKeyword) {\n for (const heritageType of heritageClause.types) {\n const implementsTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n implementsTokenRanges.push(implementsTokenRange);\n nodesToCapture.push({ node: heritageType, tokenRange: implementsTokenRange });\n }\n }\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isAbstract: boolean =\n (ts.getCombinedModifierFlags(classDeclaration) & ts.ModifierFlags.Abstract) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(classDeclaration);\n\n apiClass = new ApiClass({\n name,\n isAbstract,\n docComment,\n releaseTag,\n excerptTokens,\n typeParameters,\n extendsTokenRange,\n implementsTokenRanges,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiClass);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiClass\n });\n }\n\n private _processApiConstructSignature(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext\n ): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiConstructSignature.getContainerKey(overloadIndex);\n\n let apiConstructSignature: ApiConstructSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiConstructSignature;\n\n if (apiConstructSignature === undefined) {\n const constructSignature: ts.ConstructSignatureDeclaration =\n astDeclaration.declaration as ts.ConstructSignatureDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: constructSignature.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n constructSignature.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n constructSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(constructSignature);\n\n apiConstructSignature = new ApiConstructSignature({\n docComment,\n releaseTag,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiConstructSignature);\n }\n }\n\n private _processApiEnum(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiEnum.getContainerKey(name);\n\n let apiEnum: ApiEnum | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiEnum;\n\n if (apiEnum === undefined) {\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, []);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const preserveMemberOrder: boolean =\n this._collector.extractorConfig.enumMemberOrder === EnumMemberOrder.Preserve;\n const fileUrlPath: string = this._getFileUrlPath(astDeclaration.declaration);\n\n apiEnum = new ApiEnum({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n preserveMemberOrder,\n isExported,\n fileUrlPath\n });\n parentApiItem.addMember(apiEnum);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiEnum\n });\n }\n\n private _processApiEnumMember(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, parentApiItem } = context;\n const containerKey: string = ApiEnumMember.getContainerKey(name);\n\n let apiEnumMember: ApiEnumMember | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiEnumMember;\n\n if (apiEnumMember === undefined) {\n const enumMember: ts.EnumMember = astDeclaration.declaration as ts.EnumMember;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n let initializerTokenRange: IExcerptTokenRange | undefined = undefined;\n if (enumMember.initializer) {\n initializerTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: enumMember.initializer, tokenRange: initializerTokenRange });\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(enumMember);\n\n apiEnumMember = new ApiEnumMember({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n initializerTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiEnumMember);\n }\n }\n\n private _processApiFunction(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext,\n altFunctionDeclaration?: ts.FunctionDeclaration\n ): void {\n const { name, isExported, parentApiItem } = context;\n\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiFunction.getContainerKey(name, overloadIndex);\n\n let apiFunction: ApiFunction | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiFunction;\n\n if (apiFunction === undefined) {\n const functionDeclaration: ts.FunctionDeclaration =\n altFunctionDeclaration ?? (astDeclaration.declaration as ts.FunctionDeclaration);\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: functionDeclaration.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n functionDeclaration.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n functionDeclaration.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(functionDeclaration);\n\n apiFunction = new ApiFunction({\n name,\n docComment,\n releaseTag,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiFunction);\n }\n }\n\n private _processApiIndexSignature(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiIndexSignature.getContainerKey(overloadIndex);\n\n let apiIndexSignature: ApiIndexSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiIndexSignature;\n\n if (apiIndexSignature === undefined) {\n const indexSignature: ts.IndexSignatureDeclaration =\n astDeclaration.declaration as ts.IndexSignatureDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: indexSignature.type, tokenRange: returnTypeTokenRange });\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n indexSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(indexSignature);\n\n apiIndexSignature = new ApiIndexSignature({\n docComment,\n releaseTag,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n isReadonly,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiIndexSignature);\n }\n }\n\n private _processApiInterface(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiInterface.getContainerKey(name);\n\n let apiInterface: ApiInterface | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiInterface;\n\n if (apiInterface === undefined) {\n const interfaceDeclaration: ts.InterfaceDeclaration =\n astDeclaration.declaration as ts.InterfaceDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n interfaceDeclaration.typeParameters\n );\n\n const extendsTokenRanges: IExcerptTokenRange[] = [];\n\n for (const heritageClause of interfaceDeclaration.heritageClauses || []) {\n if (heritageClause.token === ts.SyntaxKind.ExtendsKeyword) {\n for (const heritageType of heritageClause.types) {\n const extendsTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n extendsTokenRanges.push(extendsTokenRange);\n nodesToCapture.push({ node: heritageType, tokenRange: extendsTokenRange });\n }\n }\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(interfaceDeclaration);\n\n apiInterface = new ApiInterface({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n typeParameters,\n extendsTokenRanges,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiInterface);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiInterface\n });\n }\n\n private _processApiMethod(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, parentApiItem } = context;\n const isStatic: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Static) !== 0;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiMethod.getContainerKey(name, isStatic, overloadIndex);\n\n let apiMethod: ApiMethod | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiMethod;\n\n if (apiMethod === undefined) {\n const methodDeclaration: ts.MethodDeclaration = astDeclaration.declaration as ts.MethodDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: methodDeclaration.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n methodDeclaration.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n methodDeclaration.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n if (releaseTag === ReleaseTag.Internal || releaseTag === ReleaseTag.Alpha) {\n return; // trim out items marked as \"@internal\" or \"@alpha\"\n }\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const isProtected: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Protected) !== 0;\n const isAbstract: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Abstract) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(methodDeclaration);\n\n apiMethod = new ApiMethod({\n name,\n isAbstract,\n docComment,\n releaseTag,\n isProtected,\n isStatic,\n isOptional,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiMethod);\n }\n }\n\n private _processApiMethodSignature(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext\n ): void {\n const { name, parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiMethodSignature.getContainerKey(name, overloadIndex);\n\n let apiMethodSignature: ApiMethodSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiMethodSignature;\n\n if (apiMethodSignature === undefined) {\n const methodSignature: ts.MethodSignature = astDeclaration.declaration as ts.MethodSignature;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: methodSignature.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n methodSignature.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n methodSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(methodSignature);\n\n apiMethodSignature = new ApiMethodSignature({\n name,\n docComment,\n releaseTag,\n isOptional,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiMethodSignature);\n }\n }\n\n private _processApiNamespace(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiNamespace.getContainerKey(name);\n\n let apiNamespace: ApiNamespace | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiNamespace;\n\n if (apiNamespace === undefined) {\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, []);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(astDeclaration.declaration);\n\n apiNamespace = new ApiNamespace({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n isExported,\n fileUrlPath\n });\n parentApiItem.addMember(apiNamespace);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiNamespace\n });\n }\n\n private _processApiProperty(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, parentApiItem } = context;\n const isStatic: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Static) !== 0;\n const containerKey: string = ApiProperty.getContainerKey(name, isStatic);\n\n let apiProperty: ApiProperty | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiProperty;\n\n if (apiProperty === undefined) {\n const declaration: ts.Declaration = astDeclaration.declaration;\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const propertyTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n let propertyTypeNode: ts.TypeNode | undefined;\n\n if (ts.isPropertyDeclaration(declaration) || ts.isGetAccessorDeclaration(declaration)) {\n propertyTypeNode = declaration.type;\n }\n\n if (ts.isSetAccessorDeclaration(declaration)) {\n // Note that TypeScript always reports an error if a setter does not have exactly one parameter.\n propertyTypeNode = declaration.parameters[0].type;\n }\n\n nodesToCapture.push({ node: propertyTypeNode, tokenRange: propertyTypeTokenRange });\n\n let initializerTokenRange: IExcerptTokenRange | undefined = undefined;\n if (ts.isPropertyDeclaration(declaration) && declaration.initializer) {\n initializerTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: declaration.initializer, tokenRange: initializerTokenRange });\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const isProtected: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Protected) !== 0;\n const isAbstract: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Abstract) !== 0;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(declaration);\n\n apiProperty = new ApiProperty({\n name,\n docComment,\n releaseTag,\n isAbstract,\n isProtected,\n isStatic,\n isOptional,\n isReadonly,\n excerptTokens,\n propertyTypeTokenRange,\n initializerTokenRange,\n fileUrlPath\n });\n parentApiItem.addMember(apiProperty);\n } else {\n // If the property was already declared before (via a merged interface declaration),\n // we assume its signature is identical, because the language requires that.\n }\n }\n\n private _processApiPropertySignature(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext\n ): void {\n const { name, parentApiItem } = context;\n const containerKey: string = ApiPropertySignature.getContainerKey(name);\n\n let apiPropertySignature: ApiPropertySignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiPropertySignature;\n\n if (apiPropertySignature === undefined) {\n const propertySignature: ts.PropertySignature = astDeclaration.declaration as ts.PropertySignature;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const propertyTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: propertySignature.type, tokenRange: propertyTypeTokenRange });\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(propertySignature);\n\n apiPropertySignature = new ApiPropertySignature({\n name,\n docComment,\n releaseTag,\n isOptional,\n excerptTokens,\n propertyTypeTokenRange,\n isReadonly,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiPropertySignature);\n } else {\n // If the property was already declared before (via a merged interface declaration),\n // we assume its signature is identical, because the language requires that.\n }\n }\n\n private _processApiTypeAlias(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n\n const containerKey: string = ApiTypeAlias.getContainerKey(name);\n\n let apiTypeAlias: ApiTypeAlias | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiTypeAlias;\n\n if (apiTypeAlias === undefined) {\n const typeAliasDeclaration: ts.TypeAliasDeclaration =\n astDeclaration.declaration as ts.TypeAliasDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n typeAliasDeclaration.typeParameters\n );\n\n const typeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: typeAliasDeclaration.type, tokenRange: typeTokenRange });\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(typeAliasDeclaration);\n\n apiTypeAlias = new ApiTypeAlias({\n name,\n docComment,\n typeParameters,\n releaseTag,\n excerptTokens,\n typeTokenRange,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiTypeAlias);\n }\n }\n\n private _processApiVariable(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n\n const containerKey: string = ApiVariable.getContainerKey(name);\n\n let apiVariable: ApiVariable | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiVariable;\n\n if (apiVariable === undefined) {\n const variableDeclaration: ts.VariableDeclaration =\n astDeclaration.declaration as ts.VariableDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const variableTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: variableDeclaration.type, tokenRange: variableTypeTokenRange });\n\n let initializerTokenRange: IExcerptTokenRange | undefined = undefined;\n if (variableDeclaration.initializer) {\n initializerTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: variableDeclaration.initializer, tokenRange: initializerTokenRange });\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(variableDeclaration);\n\n apiVariable = new ApiVariable({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n variableTypeTokenRange,\n initializerTokenRange,\n isReadonly,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiVariable);\n }\n }\n\n /**\n * @param nodesToCapture - A list of child nodes whose token ranges we want to capture\n */\n private _buildExcerptTokens(\n astDeclaration: AstDeclaration,\n nodesToCapture: IExcerptBuilderNodeToCapture[]\n ): IExcerptToken[] {\n const excerptTokens: IExcerptToken[] = [];\n\n // Build the main declaration\n ExcerptBuilder.addDeclaration(excerptTokens, astDeclaration, nodesToCapture, this._referenceGenerator);\n\n const declarationMetadata: DeclarationMetadata = this._collector.fetchDeclarationMetadata(astDeclaration);\n\n // Add any ancillary declarations\n for (const ancillaryDeclaration of declarationMetadata.ancillaryDeclarations) {\n ExcerptBuilder.addBlankLine(excerptTokens);\n ExcerptBuilder.addDeclaration(\n excerptTokens,\n ancillaryDeclaration,\n nodesToCapture,\n this._referenceGenerator\n );\n }\n\n return excerptTokens;\n }\n\n private _captureTypeParameters(\n nodesToCapture: IExcerptBuilderNodeToCapture[],\n typeParameterNodes: ts.NodeArray<ts.TypeParameterDeclaration> | undefined\n ): IApiTypeParameterOptions[] {\n const typeParameters: IApiTypeParameterOptions[] = [];\n if (typeParameterNodes) {\n for (const typeParameter of typeParameterNodes) {\n const constraintTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: typeParameter.constraint, tokenRange: constraintTokenRange });\n\n const defaultTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: typeParameter.default, tokenRange: defaultTypeTokenRange });\n\n typeParameters.push({\n typeParameterName: typeParameter.name.getText().trim(),\n constraintTokenRange,\n defaultTypeTokenRange\n });\n }\n }\n return typeParameters;\n }\n\n private _captureParameters(\n nodesToCapture: IExcerptBuilderNodeToCapture[],\n parameterNodes: ts.NodeArray<ts.ParameterDeclaration>\n ): IApiParameterOptions[] {\n const parameters: IApiParameterOptions[] = [];\n for (const parameter of parameterNodes) {\n const parameterTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: parameter.type, tokenRange: parameterTypeTokenRange });\n parameters.push({\n parameterName: parameter.name.getText().trim(),\n parameterTypeTokenRange,\n isOptional: this._collector.typeChecker.isOptionalParameter(parameter)\n });\n }\n return parameters;\n }\n\n private _isReadonly(astDeclaration: AstDeclaration): boolean {\n switch (astDeclaration.declaration.kind) {\n case ts.SyntaxKind.GetAccessor:\n case ts.SyntaxKind.IndexSignature:\n case ts.SyntaxKind.PropertyDeclaration:\n case ts.SyntaxKind.PropertySignature:\n case ts.SyntaxKind.SetAccessor:\n case ts.SyntaxKind.VariableDeclaration: {\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const declarationMetadata: DeclarationMetadata =\n this._collector.fetchDeclarationMetadata(astDeclaration);\n\n const hasReadonlyModifier: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Readonly) !== 0;\n const hasReadonlyDocTag: boolean = !!docComment?.modifierTagSet?.hasTagName('@readonly');\n const isGetterWithNoSetter: boolean =\n ts.isGetAccessorDeclaration(astDeclaration.declaration) &&\n declarationMetadata.ancillaryDeclarations.length === 0;\n const isVarConst: boolean =\n ts.isVariableDeclaration(astDeclaration.declaration) &&\n TypeScriptInternals.isVarConst(astDeclaration.declaration);\n\n return hasReadonlyModifier || hasReadonlyDocTag || isGetterWithNoSetter || isVarConst;\n }\n default: {\n // Readonly-ness does not make sense for any other declaration kind.\n return false;\n }\n }\n }\n\n private _getFileUrlPath(declaration: ts.Declaration): string {\n const sourceFile: ts.SourceFile = declaration.getSourceFile();\n const sourceLocation: ISourceLocation = this._collector.sourceMapper.getSourceLocation({\n sourceFile,\n pos: declaration.pos\n });\n\n let result: string = path.relative(\n this._collector.extractorConfig.projectFolder,\n sourceLocation.sourceFilePath\n );\n result = Path.convertToSlashes(result);\n return result;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ApiModelGenerator.js","sourceRoot":"","sources":["../../src/generators/ApiModelGenerator.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;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ent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n/* eslint-disable no-bitwise */\n\nimport * as path from 'path';\nimport * as ts from 'typescript';\nimport type * as tsdoc from '@microsoft/tsdoc';\nimport {\n ApiModel,\n ApiClass,\n ApiPackage,\n ApiEntryPoint,\n ApiMethod,\n ApiNamespace,\n ApiInterface,\n ApiPropertySignature,\n type ApiItemContainerMixin,\n ReleaseTag,\n ApiProperty,\n ApiMethodSignature,\n type IApiParameterOptions,\n ApiEnum,\n ApiEnumMember,\n type IExcerptTokenRange,\n type IExcerptToken,\n ApiConstructor,\n ApiConstructSignature,\n ApiFunction,\n ApiIndexSignature,\n ApiVariable,\n ApiTypeAlias,\n ApiCallSignature,\n type IApiTypeParameterOptions,\n EnumMemberOrder\n} from '@microsoft/api-extractor-model';\nimport { Path } from '@rushstack/node-core-library';\n\nimport type { Collector } from '../collector/Collector';\nimport type { ISourceLocation } from '../collector/SourceMapper';\nimport type { AstDeclaration } from '../analyzer/AstDeclaration';\nimport { ExcerptBuilder, type IExcerptBuilderNodeToCapture } from './ExcerptBuilder';\nimport { AstSymbol } from '../analyzer/AstSymbol';\nimport { DeclarationReferenceGenerator } from './DeclarationReferenceGenerator';\nimport type { ApiItemMetadata } from '../collector/ApiItemMetadata';\nimport type { DeclarationMetadata } from '../collector/DeclarationMetadata';\nimport { AstNamespaceImport } from '../analyzer/AstNamespaceImport';\nimport type { AstEntity } from '../analyzer/AstEntity';\nimport type { AstModule } from '../analyzer/AstModule';\nimport { TypeScriptInternals } from '../analyzer/TypeScriptInternals';\nimport type { ExtractorConfig } from '../api/ExtractorConfig';\n\ninterface IProcessAstEntityContext {\n name: string;\n isExported: boolean;\n parentApiItem: ApiItemContainerMixin;\n}\n\n/**\n * @beta\n */\nexport interface IApiModelGenerationOptions {\n /**\n * The release tags to trim.\n */\n releaseTagsToTrim: Set<ReleaseTag>;\n}\n\nexport class ApiModelGenerator {\n private readonly _collector: Collector;\n private readonly _apiModel: ApiModel;\n private readonly _referenceGenerator: DeclarationReferenceGenerator;\n private readonly _releaseTagsToTrim: Set<ReleaseTag> | undefined;\n\n public readonly docModelEnabled: boolean;\n\n public constructor(collector: Collector, extractorConfig: ExtractorConfig) {\n this._collector = collector;\n this._apiModel = new ApiModel();\n this._referenceGenerator = new DeclarationReferenceGenerator(collector);\n\n const apiModelGenerationOptions: IApiModelGenerationOptions | undefined =\n extractorConfig.docModelGenerationOptions;\n if (apiModelGenerationOptions) {\n this._releaseTagsToTrim = apiModelGenerationOptions.releaseTagsToTrim;\n this.docModelEnabled = true;\n } else {\n this.docModelEnabled = false;\n }\n }\n\n public get apiModel(): ApiModel {\n return this._apiModel;\n }\n\n public buildApiPackage(): ApiPackage {\n const packageDocComment: tsdoc.DocComment | undefined = this._collector.workingPackage.tsdocComment;\n\n const apiPackage: ApiPackage = new ApiPackage({\n name: this._collector.workingPackage.name,\n docComment: packageDocComment,\n tsdocConfiguration: this._collector.extractorConfig.tsdocConfiguration,\n projectFolderUrl: this._collector.extractorConfig.projectFolderUrl\n });\n this._apiModel.addMember(apiPackage);\n\n const apiEntryPoint: ApiEntryPoint = new ApiEntryPoint({ name: '' });\n apiPackage.addMember(apiEntryPoint);\n\n for (const entity of this._collector.entities) {\n // Only process entities that are exported from the entry point. Entities that are exported from\n // `AstNamespaceImport` entities will be processed by `_processAstNamespaceImport`. However, if\n // we are including forgotten exports, then process everything.\n if (entity.exportedFromEntryPoint || this._collector.extractorConfig.docModelIncludeForgottenExports) {\n this._processAstEntity(entity.astEntity, {\n name: entity.nameForEmit!,\n isExported: entity.exportedFromEntryPoint,\n parentApiItem: apiEntryPoint\n });\n }\n }\n\n return apiPackage;\n }\n\n private _processAstEntity(astEntity: AstEntity, context: IProcessAstEntityContext): void {\n if (astEntity instanceof AstSymbol) {\n // Skip ancillary declarations; we will process them with the main declaration\n for (const astDeclaration of this._collector.getNonAncillaryDeclarations(astEntity)) {\n this._processDeclaration(astDeclaration, context);\n }\n return;\n }\n\n if (astEntity instanceof AstNamespaceImport) {\n // Note that a single API item can belong to two different AstNamespaceImport namespaces. For example:\n //\n // // file.ts defines \"thing()\"\n // import * as example1 from \"./file\";\n // import * as example2 from \"./file\";\n //\n // // ...so here we end up with example1.thing() and example2.thing()\n // export { example1, example2 }\n //\n // The current logic does not try to associate \"thing()\" with a specific parent. Instead\n // the API documentation will show duplicated entries for example1.thing() and example2.thing().\n //\n // This could be improved in the future, but it requires a stable mechanism for choosing an associated parent.\n // For thoughts about this: https://github.com/microsoft/rushstack/issues/1308\n this._processAstNamespaceImport(astEntity, context);\n return;\n }\n\n // TODO: Figure out how to represent reexported AstImport objects. Basically we need to introduce a new\n // ApiItem subclass for \"export alias\", similar to a type alias, but representing declarations of the\n // form \"export { X } from 'external-package'\". We can also use this to solve GitHub issue #950.\n }\n\n private _processAstNamespaceImport(\n astNamespaceImport: AstNamespaceImport,\n context: IProcessAstEntityContext\n ): void {\n const astModule: AstModule = astNamespaceImport.astModule;\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiNamespace.getContainerKey(name);\n const fileUrlPath: string = this._getFileUrlPath(astNamespaceImport.declaration);\n\n let apiNamespace: ApiNamespace | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiNamespace;\n\n if (apiNamespace === undefined) {\n apiNamespace = new ApiNamespace({\n name,\n docComment: undefined,\n releaseTag: ReleaseTag.None,\n excerptTokens: [],\n isExported,\n fileUrlPath\n });\n parentApiItem.addMember(apiNamespace);\n }\n\n astModule.astModuleExportInfo!.exportedLocalEntities.forEach(\n (exportedEntity: AstEntity, exportedName: string) => {\n this._processAstEntity(exportedEntity, {\n name: exportedName,\n isExported: true,\n parentApiItem: apiNamespace!\n });\n }\n );\n }\n\n private _processDeclaration(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n if ((astDeclaration.modifierFlags & ts.ModifierFlags.Private) !== 0) {\n return; // trim out private declarations\n }\n\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n if (this._releaseTagsToTrim?.has(releaseTag)) {\n return;\n }\n\n switch (astDeclaration.declaration.kind) {\n case ts.SyntaxKind.CallSignature:\n this._processApiCallSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.Constructor:\n this._processApiConstructor(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.ConstructSignature:\n this._processApiConstructSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.ClassDeclaration:\n this._processApiClass(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.EnumDeclaration:\n this._processApiEnum(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.EnumMember:\n this._processApiEnumMember(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.FunctionDeclaration:\n this._processApiFunction(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.GetAccessor:\n this._processApiProperty(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.SetAccessor:\n this._processApiProperty(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.IndexSignature:\n this._processApiIndexSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.InterfaceDeclaration:\n this._processApiInterface(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.MethodDeclaration:\n this._processApiMethod(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.MethodSignature:\n this._processApiMethodSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.ModuleDeclaration:\n this._processApiNamespace(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.PropertyDeclaration:\n this._processApiProperty(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.PropertySignature:\n this._processApiPropertySignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.TypeAliasDeclaration:\n this._processApiTypeAlias(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.VariableDeclaration:\n // check for arrow functions in variable declaration\n const functionDeclaration: ts.FunctionDeclaration | undefined =\n this._tryFindFunctionDeclaration(astDeclaration);\n if (functionDeclaration) {\n this._processApiFunction(astDeclaration, context, functionDeclaration);\n } else {\n this._processApiVariable(astDeclaration, context);\n }\n break;\n\n default:\n // ignore unknown types\n }\n }\n\n private _tryFindFunctionDeclaration(astDeclaration: AstDeclaration): ts.FunctionDeclaration | undefined {\n const children: readonly ts.Node[] = astDeclaration.declaration.getChildren(\n astDeclaration.declaration.getSourceFile()\n );\n return children.find(ts.isFunctionTypeNode) as ts.FunctionDeclaration | undefined;\n }\n\n private _processChildDeclarations(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n for (const childDeclaration of astDeclaration.children) {\n this._processDeclaration(childDeclaration, {\n ...context,\n name: childDeclaration.astSymbol.localName\n });\n }\n }\n\n private _processApiCallSignature(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiCallSignature.getContainerKey(overloadIndex);\n\n let apiCallSignature: ApiCallSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiCallSignature;\n\n if (apiCallSignature === undefined) {\n const callSignature: ts.CallSignatureDeclaration =\n astDeclaration.declaration as ts.CallSignatureDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: callSignature.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n callSignature.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n callSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(callSignature);\n\n apiCallSignature = new ApiCallSignature({\n docComment,\n releaseTag,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiCallSignature);\n }\n }\n\n private _processApiConstructor(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiConstructor.getContainerKey(overloadIndex);\n\n let apiConstructor: ApiConstructor | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiConstructor;\n\n if (apiConstructor === undefined) {\n const constructorDeclaration: ts.ConstructorDeclaration =\n astDeclaration.declaration as ts.ConstructorDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n constructorDeclaration.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isProtected: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Protected) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(constructorDeclaration);\n\n apiConstructor = new ApiConstructor({\n docComment,\n releaseTag,\n isProtected,\n parameters,\n overloadIndex,\n excerptTokens,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiConstructor);\n }\n }\n\n private _processApiClass(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiClass.getContainerKey(name);\n\n let apiClass: ApiClass | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiClass;\n\n if (apiClass === undefined) {\n const classDeclaration: ts.ClassDeclaration = astDeclaration.declaration as ts.ClassDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n classDeclaration.typeParameters\n );\n\n let extendsTokenRange: IExcerptTokenRange | undefined = undefined;\n const implementsTokenRanges: IExcerptTokenRange[] = [];\n\n for (const heritageClause of classDeclaration.heritageClauses || []) {\n if (heritageClause.token === ts.SyntaxKind.ExtendsKeyword) {\n extendsTokenRange = ExcerptBuilder.createEmptyTokenRange();\n if (heritageClause.types.length > 0) {\n nodesToCapture.push({ node: heritageClause.types[0], tokenRange: extendsTokenRange });\n }\n } else if (heritageClause.token === ts.SyntaxKind.ImplementsKeyword) {\n for (const heritageType of heritageClause.types) {\n const implementsTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n implementsTokenRanges.push(implementsTokenRange);\n nodesToCapture.push({ node: heritageType, tokenRange: implementsTokenRange });\n }\n }\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isAbstract: boolean =\n (ts.getCombinedModifierFlags(classDeclaration) & ts.ModifierFlags.Abstract) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(classDeclaration);\n\n apiClass = new ApiClass({\n name,\n isAbstract,\n docComment,\n releaseTag,\n excerptTokens,\n typeParameters,\n extendsTokenRange,\n implementsTokenRanges,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiClass);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiClass\n });\n }\n\n private _processApiConstructSignature(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext\n ): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiConstructSignature.getContainerKey(overloadIndex);\n\n let apiConstructSignature: ApiConstructSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiConstructSignature;\n\n if (apiConstructSignature === undefined) {\n const constructSignature: ts.ConstructSignatureDeclaration =\n astDeclaration.declaration as ts.ConstructSignatureDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: constructSignature.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n constructSignature.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n constructSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(constructSignature);\n\n apiConstructSignature = new ApiConstructSignature({\n docComment,\n releaseTag,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiConstructSignature);\n }\n }\n\n private _processApiEnum(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiEnum.getContainerKey(name);\n\n let apiEnum: ApiEnum | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiEnum;\n\n if (apiEnum === undefined) {\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, []);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const preserveMemberOrder: boolean =\n this._collector.extractorConfig.enumMemberOrder === EnumMemberOrder.Preserve;\n const fileUrlPath: string = this._getFileUrlPath(astDeclaration.declaration);\n\n apiEnum = new ApiEnum({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n preserveMemberOrder,\n isExported,\n fileUrlPath\n });\n parentApiItem.addMember(apiEnum);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiEnum\n });\n }\n\n private _processApiEnumMember(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, parentApiItem } = context;\n const containerKey: string = ApiEnumMember.getContainerKey(name);\n\n let apiEnumMember: ApiEnumMember | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiEnumMember;\n\n if (apiEnumMember === undefined) {\n const enumMember: ts.EnumMember = astDeclaration.declaration as ts.EnumMember;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n let initializerTokenRange: IExcerptTokenRange | undefined = undefined;\n if (enumMember.initializer) {\n initializerTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: enumMember.initializer, tokenRange: initializerTokenRange });\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(enumMember);\n\n apiEnumMember = new ApiEnumMember({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n initializerTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiEnumMember);\n }\n }\n\n private _processApiFunction(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext,\n altFunctionDeclaration?: ts.FunctionDeclaration\n ): void {\n const { name, isExported, parentApiItem } = context;\n\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiFunction.getContainerKey(name, overloadIndex);\n\n let apiFunction: ApiFunction | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiFunction;\n\n if (apiFunction === undefined) {\n const functionDeclaration: ts.FunctionDeclaration =\n altFunctionDeclaration ?? (astDeclaration.declaration as ts.FunctionDeclaration);\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: functionDeclaration.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n functionDeclaration.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n functionDeclaration.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(functionDeclaration);\n\n apiFunction = new ApiFunction({\n name,\n docComment,\n releaseTag,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiFunction);\n }\n }\n\n private _processApiIndexSignature(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiIndexSignature.getContainerKey(overloadIndex);\n\n let apiIndexSignature: ApiIndexSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiIndexSignature;\n\n if (apiIndexSignature === undefined) {\n const indexSignature: ts.IndexSignatureDeclaration =\n astDeclaration.declaration as ts.IndexSignatureDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: indexSignature.type, tokenRange: returnTypeTokenRange });\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n indexSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(indexSignature);\n\n apiIndexSignature = new ApiIndexSignature({\n docComment,\n releaseTag,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n isReadonly,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiIndexSignature);\n }\n }\n\n private _processApiInterface(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiInterface.getContainerKey(name);\n\n let apiInterface: ApiInterface | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiInterface;\n\n if (apiInterface === undefined) {\n const interfaceDeclaration: ts.InterfaceDeclaration =\n astDeclaration.declaration as ts.InterfaceDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n interfaceDeclaration.typeParameters\n );\n\n const extendsTokenRanges: IExcerptTokenRange[] = [];\n\n for (const heritageClause of interfaceDeclaration.heritageClauses || []) {\n if (heritageClause.token === ts.SyntaxKind.ExtendsKeyword) {\n for (const heritageType of heritageClause.types) {\n const extendsTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n extendsTokenRanges.push(extendsTokenRange);\n nodesToCapture.push({ node: heritageType, tokenRange: extendsTokenRange });\n }\n }\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(interfaceDeclaration);\n\n apiInterface = new ApiInterface({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n typeParameters,\n extendsTokenRanges,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiInterface);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiInterface\n });\n }\n\n private _processApiMethod(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, parentApiItem } = context;\n const isStatic: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Static) !== 0;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiMethod.getContainerKey(name, isStatic, overloadIndex);\n\n let apiMethod: ApiMethod | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiMethod;\n\n if (apiMethod === undefined) {\n const methodDeclaration: ts.MethodDeclaration = astDeclaration.declaration as ts.MethodDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: methodDeclaration.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n methodDeclaration.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n methodDeclaration.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n if (releaseTag === ReleaseTag.Internal || releaseTag === ReleaseTag.Alpha) {\n return; // trim out items marked as \"@internal\" or \"@alpha\"\n }\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const isProtected: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Protected) !== 0;\n const isAbstract: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Abstract) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(methodDeclaration);\n\n apiMethod = new ApiMethod({\n name,\n isAbstract,\n docComment,\n releaseTag,\n isProtected,\n isStatic,\n isOptional,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiMethod);\n }\n }\n\n private _processApiMethodSignature(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext\n ): void {\n const { name, parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiMethodSignature.getContainerKey(name, overloadIndex);\n\n let apiMethodSignature: ApiMethodSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiMethodSignature;\n\n if (apiMethodSignature === undefined) {\n const methodSignature: ts.MethodSignature = astDeclaration.declaration as ts.MethodSignature;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: methodSignature.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n methodSignature.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n methodSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(methodSignature);\n\n apiMethodSignature = new ApiMethodSignature({\n name,\n docComment,\n releaseTag,\n isOptional,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiMethodSignature);\n }\n }\n\n private _processApiNamespace(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiNamespace.getContainerKey(name);\n\n let apiNamespace: ApiNamespace | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiNamespace;\n\n if (apiNamespace === undefined) {\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, []);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(astDeclaration.declaration);\n\n apiNamespace = new ApiNamespace({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n isExported,\n fileUrlPath\n });\n parentApiItem.addMember(apiNamespace);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiNamespace\n });\n }\n\n private _processApiProperty(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, parentApiItem } = context;\n const isStatic: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Static) !== 0;\n const containerKey: string = ApiProperty.getContainerKey(name, isStatic);\n\n let apiProperty: ApiProperty | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiProperty;\n\n if (apiProperty === undefined) {\n const declaration: ts.Declaration = astDeclaration.declaration;\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const propertyTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n let propertyTypeNode: ts.TypeNode | undefined;\n\n if (ts.isPropertyDeclaration(declaration) || ts.isGetAccessorDeclaration(declaration)) {\n propertyTypeNode = declaration.type;\n }\n\n if (ts.isSetAccessorDeclaration(declaration)) {\n // Note that TypeScript always reports an error if a setter does not have exactly one parameter.\n propertyTypeNode = declaration.parameters[0].type;\n }\n\n nodesToCapture.push({ node: propertyTypeNode, tokenRange: propertyTypeTokenRange });\n\n let initializerTokenRange: IExcerptTokenRange | undefined = undefined;\n if (ts.isPropertyDeclaration(declaration) && declaration.initializer) {\n initializerTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: declaration.initializer, tokenRange: initializerTokenRange });\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const isProtected: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Protected) !== 0;\n const isAbstract: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Abstract) !== 0;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(declaration);\n\n apiProperty = new ApiProperty({\n name,\n docComment,\n releaseTag,\n isAbstract,\n isProtected,\n isStatic,\n isOptional,\n isReadonly,\n excerptTokens,\n propertyTypeTokenRange,\n initializerTokenRange,\n fileUrlPath\n });\n parentApiItem.addMember(apiProperty);\n } else {\n // If the property was already declared before (via a merged interface declaration),\n // we assume its signature is identical, because the language requires that.\n }\n }\n\n private _processApiPropertySignature(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext\n ): void {\n const { name, parentApiItem } = context;\n const containerKey: string = ApiPropertySignature.getContainerKey(name);\n\n let apiPropertySignature: ApiPropertySignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiPropertySignature;\n\n if (apiPropertySignature === undefined) {\n const propertySignature: ts.PropertySignature = astDeclaration.declaration as ts.PropertySignature;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const propertyTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: propertySignature.type, tokenRange: propertyTypeTokenRange });\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(propertySignature);\n\n apiPropertySignature = new ApiPropertySignature({\n name,\n docComment,\n releaseTag,\n isOptional,\n excerptTokens,\n propertyTypeTokenRange,\n isReadonly,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiPropertySignature);\n } else {\n // If the property was already declared before (via a merged interface declaration),\n // we assume its signature is identical, because the language requires that.\n }\n }\n\n private _processApiTypeAlias(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n\n const containerKey: string = ApiTypeAlias.getContainerKey(name);\n\n let apiTypeAlias: ApiTypeAlias | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiTypeAlias;\n\n if (apiTypeAlias === undefined) {\n const typeAliasDeclaration: ts.TypeAliasDeclaration =\n astDeclaration.declaration as ts.TypeAliasDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n typeAliasDeclaration.typeParameters\n );\n\n const typeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: typeAliasDeclaration.type, tokenRange: typeTokenRange });\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(typeAliasDeclaration);\n\n apiTypeAlias = new ApiTypeAlias({\n name,\n docComment,\n typeParameters,\n releaseTag,\n excerptTokens,\n typeTokenRange,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiTypeAlias);\n }\n }\n\n private _processApiVariable(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n\n const containerKey: string = ApiVariable.getContainerKey(name);\n\n let apiVariable: ApiVariable | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiVariable;\n\n if (apiVariable === undefined) {\n const variableDeclaration: ts.VariableDeclaration =\n astDeclaration.declaration as ts.VariableDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const variableTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: variableDeclaration.type, tokenRange: variableTypeTokenRange });\n\n let initializerTokenRange: IExcerptTokenRange | undefined = undefined;\n if (variableDeclaration.initializer) {\n initializerTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: variableDeclaration.initializer, tokenRange: initializerTokenRange });\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(variableDeclaration);\n\n apiVariable = new ApiVariable({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n variableTypeTokenRange,\n initializerTokenRange,\n isReadonly,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiVariable);\n }\n }\n\n /**\n * @param nodesToCapture - A list of child nodes whose token ranges we want to capture\n */\n private _buildExcerptTokens(\n astDeclaration: AstDeclaration,\n nodesToCapture: IExcerptBuilderNodeToCapture[]\n ): IExcerptToken[] {\n const excerptTokens: IExcerptToken[] = [];\n\n // Build the main declaration\n ExcerptBuilder.addDeclaration(excerptTokens, astDeclaration, nodesToCapture, this._referenceGenerator);\n\n const declarationMetadata: DeclarationMetadata = this._collector.fetchDeclarationMetadata(astDeclaration);\n\n // Add any ancillary declarations\n for (const ancillaryDeclaration of declarationMetadata.ancillaryDeclarations) {\n ExcerptBuilder.addBlankLine(excerptTokens);\n ExcerptBuilder.addDeclaration(\n excerptTokens,\n ancillaryDeclaration,\n nodesToCapture,\n this._referenceGenerator\n );\n }\n\n return excerptTokens;\n }\n\n private _captureTypeParameters(\n nodesToCapture: IExcerptBuilderNodeToCapture[],\n typeParameterNodes: ts.NodeArray<ts.TypeParameterDeclaration> | undefined\n ): IApiTypeParameterOptions[] {\n const typeParameters: IApiTypeParameterOptions[] = [];\n if (typeParameterNodes) {\n for (const typeParameter of typeParameterNodes) {\n const constraintTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: typeParameter.constraint, tokenRange: constraintTokenRange });\n\n const defaultTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: typeParameter.default, tokenRange: defaultTypeTokenRange });\n\n typeParameters.push({\n typeParameterName: typeParameter.name.getText().trim(),\n constraintTokenRange,\n defaultTypeTokenRange\n });\n }\n }\n return typeParameters;\n }\n\n private _captureParameters(\n nodesToCapture: IExcerptBuilderNodeToCapture[],\n parameterNodes: ts.NodeArray<ts.ParameterDeclaration>\n ): IApiParameterOptions[] {\n const parameters: IApiParameterOptions[] = [];\n for (const parameter of parameterNodes) {\n const parameterTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: parameter.type, tokenRange: parameterTypeTokenRange });\n parameters.push({\n parameterName: parameter.name.getText().trim(),\n parameterTypeTokenRange,\n isOptional: this._collector.typeChecker.isOptionalParameter(parameter)\n });\n }\n return parameters;\n }\n\n private _isReadonly(astDeclaration: AstDeclaration): boolean {\n switch (astDeclaration.declaration.kind) {\n case ts.SyntaxKind.GetAccessor:\n case ts.SyntaxKind.IndexSignature:\n case ts.SyntaxKind.PropertyDeclaration:\n case ts.SyntaxKind.PropertySignature:\n case ts.SyntaxKind.SetAccessor:\n case ts.SyntaxKind.VariableDeclaration: {\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const declarationMetadata: DeclarationMetadata =\n this._collector.fetchDeclarationMetadata(astDeclaration);\n\n const hasReadonlyModifier: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Readonly) !== 0;\n const hasReadonlyDocTag: boolean = !!docComment?.modifierTagSet?.hasTagName('@readonly');\n const isGetterWithNoSetter: boolean =\n ts.isGetAccessorDeclaration(astDeclaration.declaration) &&\n declarationMetadata.ancillaryDeclarations.length === 0;\n const isVarConst: boolean =\n ts.isVariableDeclaration(astDeclaration.declaration) &&\n TypeScriptInternals.isVarConst(astDeclaration.declaration);\n\n return hasReadonlyModifier || hasReadonlyDocTag || isGetterWithNoSetter || isVarConst;\n }\n default: {\n // Readonly-ness does not make sense for any other declaration kind.\n return false;\n }\n }\n }\n\n private _getFileUrlPath(declaration: ts.Declaration): string {\n const sourceFile: ts.SourceFile = declaration.getSourceFile();\n const sourceLocation: ISourceLocation = this._collector.sourceMapper.getSourceLocation({\n sourceFile,\n pos: declaration.pos\n });\n\n let result: string = path.relative(\n this._collector.extractorConfig.projectFolder,\n sourceLocation.sourceFilePath\n );\n result = Path.convertToSlashes(result);\n return result;\n }\n}\n"]}
|
|
@@ -34,17 +34,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
return result;
|
|
35
35
|
};
|
|
36
36
|
})();
|
|
37
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
38
|
-
var t = {};
|
|
39
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
40
|
-
t[p] = s[p];
|
|
41
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
42
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
43
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
44
|
-
t[p[i]] = s[p[i]];
|
|
45
|
-
}
|
|
46
|
-
return t;
|
|
47
|
-
};
|
|
48
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
38
|
exports.ApiReportGenerator = void 0;
|
|
50
39
|
const ts = __importStar(require("typescript"));
|
|
@@ -472,7 +461,7 @@ class ApiReportGenerator {
|
|
|
472
461
|
// Note that the ordering we handle the standard tags is important for backwards compatibility.
|
|
473
462
|
// Also note that we had special mechanisms for checking whether or not an item is documented with these tags,
|
|
474
463
|
// so they are checked specially.
|
|
475
|
-
const
|
|
464
|
+
const { '@sealed': reportSealedTag, '@virtual': reportVirtualTag, '@override': reportOverrideTag, '@eventProperty': reportEventPropertyTag, '@deprecated': reportDeprecatedTag, ...otherTagsToReport } = collector.extractorConfig.tagsToReport;
|
|
476
465
|
// 2.a Check for standard tags and report those that are both configured and present in the metadata.
|
|
477
466
|
if (reportSealedTag && apiItemMetadata.isSealed) {
|
|
478
467
|
footerParts.push('@sealed');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReportGenerator.js","sourceRoot":"","sources":["../../src/generators/ApiReportGenerator.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,+CAAiC;AACjC,oEAAmE;AACnE,wEAA4D;AAE5D,sDAAmD;AACnD,qEAAkE;AAClE,2CAAwC;AAExC,+DAA4D;AAE5D,qDAAkD;AAClD,qDAAkD;AAElD,qDAAkD;AAClD,qDAAkD;AAClD,uEAAoE;AAGpE,yFAAsF;AACtF,kEAA+D;AAG/D,MAAa,kBAAkB;IAG7B;;;;;;OAMG;IACI,MAAM,CAAC,4BAA4B,CACxC,iBAAyB,EACzB,mBAA2B;QAE3B,wCAAwC;QACxC,MAAM,gBAAgB,GAAW,iBAAiB,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QAC1E,MAAM,kBAAkB,GAAW,mBAAmB,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QAC9E,OAAO,gBAAgB,KAAK,kBAAkB,CAAC;IACjD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,yBAAyB,CAAC,SAAoB,EAAE,aAA+B;QAC3F,MAAM,MAAM,GAAmB,IAAI,+BAAc,EAAE,CAAC;QACpD,MAAM,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAEhC,SAAS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uEAAuE;YACvE,IAAI,eAAe,CAAC,YAAY,EAAE,CAAC;gBACjC,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;gBAEnC,SAAS,CAAC,aAAa,CAAC,gBAAgB,CACtC,uCAAkB,CAAC,YAAY,EAC/B,8BAA8B,cAAc,CAAC,SAAS,CAAC,SAAS,IAAI,EACpE,cAAc,CACf,CAAC;YACJ,CAAC;YAED,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC3B,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAChC,kBAAkB,CAAC,oBAAoB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,iCAAiC;gBACxF,CAAC;gBAED,kBAAkB,CAAC,oBAAoB,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;YACzE,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;IAEO,MAAM,CAAC,oBAAoB,CAAC,MAAsB,EAAE,IAAY;QACtE,MAAM,KAAK,GAAa,wBAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3D,KAAK,MAAM,QAAQ,IAAI,KAAK,EAAE,CAAC;YAC7B,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACvB,MAAM,CAAC,SAAS,EAAE,CAAC;QACrB,CAAC;IACH,CAAC;;AAvmBH,gDAwmBC;AAvmBgB,oCAAiB,GAAW,OAAO,CAAC","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 ts from 'typescript';\nimport { Text, InternalError } from '@rushstack/node-core-library';\nimport { ReleaseTag } from '@microsoft/api-extractor-model';\n\nimport { Collector } from '../collector/Collector';\nimport { TypeScriptHelpers } from '../analyzer/TypeScriptHelpers';\nimport { Span } from '../analyzer/Span';\nimport type { CollectorEntity } from '../collector/CollectorEntity';\nimport { AstDeclaration } from '../analyzer/AstDeclaration';\nimport type { ApiItemMetadata } from '../collector/ApiItemMetadata';\nimport { AstImport } from '../analyzer/AstImport';\nimport { AstSymbol } from '../analyzer/AstSymbol';\nimport type { ExtractorMessage } from '../api/ExtractorMessage';\nimport { IndentedWriter } from './IndentedWriter';\nimport { DtsEmitHelpers } from './DtsEmitHelpers';\nimport { AstNamespaceImport } from '../analyzer/AstNamespaceImport';\nimport type { AstEntity } from '../analyzer/AstEntity';\nimport type { IAstModuleExportInfo } from '../analyzer/AstModule';\nimport { SourceFileLocationFormatter } from '../analyzer/SourceFileLocationFormatter';\nimport { ExtractorMessageId } from '../api/ExtractorMessageId';\nimport type { ApiReportVariant } from '../api/IConfigFile';\n\nexport class ApiReportGenerator {\n private static _trimSpacesRegExp: RegExp = / +$/gm;\n\n /**\n * Compares the contents of two API files that were created using ApiFileGenerator,\n * and returns true if they are equivalent. Note that these files are not normally edited\n * by a human; the \"equivalence\" comparison here is intended to ignore spurious changes that\n * might be introduced by a tool, e.g. Git newline normalization or an editor that strips\n * whitespace when saving.\n */\n public static areEquivalentApiFileContents(\n actualFileContent: string,\n expectedFileContent: string\n ): boolean {\n // NOTE: \"\\s\" also matches \"\\r\" and \"\\n\"\n const normalizedActual: string = actualFileContent.replace(/[\\s]+/g, ' ');\n const normalizedExpected: string = expectedFileContent.replace(/[\\s]+/g, ' ');\n return normalizedActual === normalizedExpected;\n }\n\n /**\n * Generates and returns the API report contents as a string.\n *\n * @param reportVariant - The release level with which the report is associated.\n * Can also be viewed as the minimal release level of items that should be included in the report.\n */\n public static generateReviewFileContent(collector: Collector, reportVariant: ApiReportVariant): string {\n const writer: IndentedWriter = new IndentedWriter();\n writer.trimLeadingSpaces = true;\n\n function capitalizeFirstLetter(input: string): string {\n return input === '' ? '' : `${input[0].toLocaleUpperCase()}${input.slice(1)}`;\n }\n\n // For backwards compatibility, don't emit \"complete\" in report text for untrimmed reports.\n const releaseLevelPrefix: string =\n reportVariant === 'complete' ? '' : `${capitalizeFirstLetter(reportVariant)} `;\n writer.writeLine(\n [\n `## ${releaseLevelPrefix}API Report File for \"${collector.workingPackage.name}\"`,\n ``,\n `> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).`,\n ``\n ].join('\\n')\n );\n\n // Write the opening delimiter for the Markdown code fence\n writer.writeLine('```ts\\n');\n\n // Emit the triple slash directives\n for (const typeDirectiveReference of Array.from(collector.dtsTypeReferenceDirectives).sort()) {\n // https://github.com/microsoft/TypeScript/blob/611ebc7aadd7a44a4c0447698bfda9222a78cb66/src/compiler/declarationEmitter.ts#L162\n writer.writeLine(`/// <reference types=\"${typeDirectiveReference}\" />`);\n }\n for (const libDirectiveReference of Array.from(collector.dtsLibReferenceDirectives).sort()) {\n writer.writeLine(`/// <reference lib=\"${libDirectiveReference}\" />`);\n }\n writer.ensureSkippedLine();\n\n // Emit the imports\n for (const entity of collector.entities) {\n if (entity.astEntity instanceof AstImport) {\n DtsEmitHelpers.emitImport(writer, entity, entity.astEntity);\n }\n }\n writer.ensureSkippedLine();\n\n // Emit the regular declarations\n for (const entity of collector.entities) {\n const astEntity: AstEntity = entity.astEntity;\n if (entity.consumable || collector.extractorConfig.apiReportIncludeForgottenExports) {\n // First, collect the list of export names for this symbol. When reporting messages with\n // ExtractorMessage.properties.exportName, this will enable us to emit the warning comments alongside\n // the associated export statement.\n interface IExportToEmit {\n readonly exportName: string;\n readonly associatedMessages: ExtractorMessage[];\n }\n const exportsToEmit: Map<string, IExportToEmit> = new Map<string, IExportToEmit>();\n\n for (const exportName of entity.exportNames) {\n if (!entity.shouldInlineExport) {\n exportsToEmit.set(exportName, { exportName, associatedMessages: [] });\n }\n }\n\n if (astEntity instanceof AstSymbol) {\n // Emit all the declarations for this entity\n for (const astDeclaration of astEntity.astDeclarations || []) {\n // Get the messages associated with this declaration\n const fetchedMessages: ExtractorMessage[] =\n collector.messageRouter.fetchAssociatedMessagesForReviewFile(astDeclaration);\n\n // Peel off the messages associated with an export statement and store them\n // in IExportToEmit.associatedMessages (to be processed later). The remaining messages will\n // added to messagesToReport, to be emitted next to the declaration instead of the export statement.\n const messagesToReport: ExtractorMessage[] = [];\n for (const message of fetchedMessages) {\n if (message.properties.exportName) {\n const exportToEmit: IExportToEmit | undefined = exportsToEmit.get(\n message.properties.exportName\n );\n if (exportToEmit) {\n exportToEmit.associatedMessages.push(message);\n continue;\n }\n }\n messagesToReport.push(message);\n }\n\n if (this._shouldIncludeInReport(collector, astDeclaration, reportVariant)) {\n writer.ensureSkippedLine();\n writer.write(ApiReportGenerator._getAedocSynopsis(collector, astDeclaration, messagesToReport));\n\n const span: Span = new Span(astDeclaration.declaration);\n\n const apiItemMetadata: ApiItemMetadata = collector.fetchApiItemMetadata(astDeclaration);\n if (apiItemMetadata.isPreapproved) {\n ApiReportGenerator._modifySpanForPreapproved(span);\n } else {\n ApiReportGenerator._modifySpan(collector, span, entity, astDeclaration, false, reportVariant);\n }\n\n span.writeModifiedText(writer);\n writer.ensureNewLine();\n }\n }\n }\n\n if (astEntity instanceof AstNamespaceImport) {\n const astModuleExportInfo: IAstModuleExportInfo = astEntity.fetchAstModuleExportInfo(collector);\n\n if (entity.nameForEmit === undefined) {\n // This should never happen\n throw new InternalError('referencedEntry.nameForEmit is undefined');\n }\n\n if (astModuleExportInfo.starExportedExternalModules.size > 0) {\n // We could support this, but we would need to find a way to safely represent it.\n throw new Error(\n `The ${entity.nameForEmit} namespace import includes a star export, which is not supported:\\n` +\n SourceFileLocationFormatter.formatDeclaration(astEntity.declaration)\n );\n }\n\n // Emit a synthetic declaration for the namespace. It will look like this:\n //\n // declare namespace example {\n // export {\n // f1,\n // f2\n // }\n // }\n //\n // Note that we do not try to relocate f1()/f2() to be inside the namespace because other type\n // signatures may reference them directly (without using the namespace qualifier).\n\n writer.ensureSkippedLine();\n writer.writeLine(`declare namespace ${entity.nameForEmit} {`);\n\n // all local exports of local imported module are just references to top-level declarations\n writer.increaseIndent();\n writer.writeLine('export {');\n writer.increaseIndent();\n\n const exportClauses: string[] = [];\n for (const [exportedName, exportedEntity] of astModuleExportInfo.exportedLocalEntities) {\n const collectorEntity: CollectorEntity | undefined =\n collector.tryGetCollectorEntity(exportedEntity);\n if (collectorEntity === undefined) {\n // This should never happen\n // top-level exports of local imported module should be added as collector entities before\n throw new InternalError(\n `Cannot find collector entity for ${entity.nameForEmit}.${exportedEntity.localName}`\n );\n }\n\n if (collectorEntity.nameForEmit === exportedName) {\n exportClauses.push(collectorEntity.nameForEmit);\n } else {\n exportClauses.push(`${collectorEntity.nameForEmit} as ${exportedName}`);\n }\n }\n writer.writeLine(exportClauses.join(',\\n'));\n\n writer.decreaseIndent();\n writer.writeLine('}'); // end of \"export { ... }\"\n writer.decreaseIndent();\n writer.writeLine('}'); // end of \"declare namespace { ... }\"\n }\n\n // Now emit the export statements for this entity.\n for (const exportToEmit of exportsToEmit.values()) {\n // Write any associated messages\n if (exportToEmit.associatedMessages.length > 0) {\n writer.ensureSkippedLine();\n for (const message of exportToEmit.associatedMessages) {\n ApiReportGenerator._writeLineAsComments(\n writer,\n 'Warning: ' + message.formatMessageWithoutLocation()\n );\n }\n }\n\n DtsEmitHelpers.emitNamedExport(writer, exportToEmit.exportName, entity);\n }\n writer.ensureSkippedLine();\n }\n }\n\n DtsEmitHelpers.emitStarExports(writer, collector);\n\n // Write the unassociated warnings at the bottom of the file\n const unassociatedMessages: ExtractorMessage[] =\n collector.messageRouter.fetchUnassociatedMessagesForReviewFile();\n if (unassociatedMessages.length > 0) {\n writer.ensureSkippedLine();\n ApiReportGenerator._writeLineAsComments(writer, 'Warnings were encountered during analysis:');\n ApiReportGenerator._writeLineAsComments(writer, '');\n for (const unassociatedMessage of unassociatedMessages) {\n ApiReportGenerator._writeLineAsComments(\n writer,\n unassociatedMessage.formatMessageWithLocation(collector.workingPackage.packageFolder)\n );\n }\n }\n\n if (collector.workingPackage.tsdocComment === undefined) {\n writer.ensureSkippedLine();\n ApiReportGenerator._writeLineAsComments(writer, '(No @packageDocumentation comment for this package)');\n }\n\n // Write the closing delimiter for the Markdown code fence\n writer.ensureSkippedLine();\n writer.writeLine('```');\n\n // Remove any trailing spaces\n return writer.toString().replace(ApiReportGenerator._trimSpacesRegExp, '');\n }\n\n /**\n * Before writing out a declaration, _modifySpan() applies various fixups to make it nice.\n */\n private static _modifySpan(\n collector: Collector,\n span: Span,\n entity: CollectorEntity,\n astDeclaration: AstDeclaration,\n insideTypeLiteral: boolean,\n reportVariant: ApiReportVariant\n ): void {\n // Should we process this declaration at all?\n // eslint-disable-next-line no-bitwise\n if (!ApiReportGenerator._shouldIncludeInReport(collector, astDeclaration, reportVariant)) {\n span.modification.skipAll();\n return;\n }\n\n const previousSpan: Span | undefined = span.previousSibling;\n\n let recurseChildren: boolean = true;\n let sortChildren: boolean = false;\n\n switch (span.kind) {\n case ts.SyntaxKind.JSDocComment:\n span.modification.skipAll();\n // For now, we don't transform JSDoc comment nodes at all\n recurseChildren = false;\n break;\n\n case ts.SyntaxKind.ExportKeyword:\n case ts.SyntaxKind.DefaultKeyword:\n case ts.SyntaxKind.DeclareKeyword:\n // Delete any explicit \"export\" or \"declare\" keywords -- we will re-add them below\n span.modification.skipAll();\n break;\n\n case ts.SyntaxKind.InterfaceKeyword:\n case ts.SyntaxKind.ClassKeyword:\n case ts.SyntaxKind.EnumKeyword:\n case ts.SyntaxKind.NamespaceKeyword:\n case ts.SyntaxKind.ModuleKeyword:\n case ts.SyntaxKind.TypeKeyword:\n case ts.SyntaxKind.FunctionKeyword:\n // Replace the stuff we possibly deleted above\n let replacedModifiers: string = '';\n\n if (entity.shouldInlineExport) {\n replacedModifiers = 'export ' + replacedModifiers;\n }\n\n if (previousSpan && previousSpan.kind === ts.SyntaxKind.SyntaxList) {\n // If there is a previous span of type SyntaxList, then apply it before any other modifiers\n // (e.g. \"abstract\") that appear there.\n previousSpan.modification.prefix = replacedModifiers + previousSpan.modification.prefix;\n } else {\n // Otherwise just stick it in front of this span\n span.modification.prefix = replacedModifiers + span.modification.prefix;\n }\n break;\n\n case ts.SyntaxKind.SyntaxList:\n if (span.parent) {\n if (AstDeclaration.isSupportedSyntaxKind(span.parent.kind)) {\n // If the immediate parent is an API declaration, and the immediate children are API declarations,\n // then sort the children alphabetically\n sortChildren = true;\n } else if (span.parent.kind === ts.SyntaxKind.ModuleBlock) {\n // Namespaces are special because their chain goes ModuleDeclaration -> ModuleBlock -> SyntaxList\n sortChildren = true;\n }\n }\n break;\n\n case ts.SyntaxKind.VariableDeclaration:\n if (!span.parent) {\n // The VariableDeclaration node is part of a VariableDeclarationList, however\n // the Entry.followedSymbol points to the VariableDeclaration part because\n // multiple definitions might share the same VariableDeclarationList.\n //\n // Since we are emitting a separate declaration for each one, we need to look upwards\n // in the ts.Node tree and write a copy of the enclosing VariableDeclarationList\n // content (e.g. \"var\" from \"var x=1, y=2\").\n const list: ts.VariableDeclarationList | undefined = TypeScriptHelpers.matchAncestor(span.node, [\n ts.SyntaxKind.VariableDeclarationList,\n ts.SyntaxKind.VariableDeclaration\n ]);\n if (!list) {\n // This should not happen unless the compiler API changes somehow\n throw new InternalError('Unsupported variable declaration');\n }\n const listPrefix: string = list\n .getSourceFile()\n .text.substring(list.getStart(), list.declarations[0].getStart());\n span.modification.prefix = listPrefix + span.modification.prefix;\n span.modification.suffix = ';';\n\n if (entity.shouldInlineExport) {\n span.modification.prefix = 'export ' + span.modification.prefix;\n }\n }\n break;\n\n case ts.SyntaxKind.Identifier:\n const referencedEntity: CollectorEntity | undefined = collector.tryGetEntityForNode(\n span.node as ts.Identifier\n );\n\n if (referencedEntity) {\n if (!referencedEntity.nameForEmit) {\n // This should never happen\n throw new InternalError('referencedEntry.nameForEmit is undefined');\n }\n\n span.modification.prefix = referencedEntity.nameForEmit;\n // For debugging:\n // span.modification.prefix += '/*R=FIX*/';\n } else {\n // For debugging:\n // span.modification.prefix += '/*R=KEEP*/';\n }\n\n break;\n\n case ts.SyntaxKind.TypeLiteral:\n insideTypeLiteral = true;\n break;\n\n case ts.SyntaxKind.ImportType:\n DtsEmitHelpers.modifyImportTypeSpan(\n collector,\n span,\n astDeclaration,\n (childSpan, childAstDeclaration) => {\n ApiReportGenerator._modifySpan(\n collector,\n childSpan,\n entity,\n childAstDeclaration,\n insideTypeLiteral,\n reportVariant\n );\n }\n );\n break;\n }\n\n if (recurseChildren) {\n for (const child of span.children) {\n let childAstDeclaration: AstDeclaration = astDeclaration;\n\n if (AstDeclaration.isSupportedSyntaxKind(child.kind)) {\n childAstDeclaration = collector.astSymbolTable.getChildAstDeclarationByNode(\n child.node,\n astDeclaration\n );\n\n if (ApiReportGenerator._shouldIncludeInReport(collector, childAstDeclaration, reportVariant)) {\n if (sortChildren) {\n span.modification.sortChildren = true;\n child.modification.sortKey = Collector.getSortKeyIgnoringUnderscore(\n childAstDeclaration.astSymbol.localName\n );\n }\n\n if (!insideTypeLiteral) {\n const messagesToReport: ExtractorMessage[] =\n collector.messageRouter.fetchAssociatedMessagesForReviewFile(childAstDeclaration);\n\n // NOTE: This generates ae-undocumented messages as a side effect\n const aedocSynopsis: string = ApiReportGenerator._getAedocSynopsis(\n collector,\n childAstDeclaration,\n messagesToReport\n );\n\n child.modification.prefix = aedocSynopsis + child.modification.prefix;\n }\n }\n }\n\n ApiReportGenerator._modifySpan(\n collector,\n child,\n entity,\n childAstDeclaration,\n insideTypeLiteral,\n reportVariant\n );\n }\n }\n }\n\n private static _shouldIncludeInReport(\n collector: Collector,\n astDeclaration: AstDeclaration,\n reportVariant: ApiReportVariant\n ): boolean {\n // Private declarations are not included in the API report\n // eslint-disable-next-line no-bitwise\n if ((astDeclaration.modifierFlags & ts.ModifierFlags.Private) !== 0) {\n return false;\n }\n\n const apiItemMetadata: ApiItemMetadata = collector.fetchApiItemMetadata(astDeclaration);\n\n // No specified release tag is considered the same as `@public`.\n const releaseTag: ReleaseTag =\n apiItemMetadata.effectiveReleaseTag === ReleaseTag.None\n ? ReleaseTag.Public\n : apiItemMetadata.effectiveReleaseTag;\n\n // If the declaration has a release tag that is not in scope, omit it from the report.\n switch (reportVariant) {\n case 'complete':\n return true;\n case 'alpha':\n return releaseTag >= ReleaseTag.Alpha;\n case 'beta':\n return releaseTag >= ReleaseTag.Beta;\n case 'public':\n return releaseTag === ReleaseTag.Public;\n default:\n throw new Error(`Unrecognized release level: ${reportVariant}`);\n }\n }\n\n /**\n * For declarations marked as `@preapproved`, this is used instead of _modifySpan().\n */\n private static _modifySpanForPreapproved(span: Span): void {\n // Match something like this:\n //\n // ClassDeclaration:\n // SyntaxList:\n // ExportKeyword: pre=[export] sep=[ ]\n // DeclareKeyword: pre=[declare] sep=[ ]\n // ClassKeyword: pre=[class] sep=[ ]\n // Identifier: pre=[_PreapprovedClass] sep=[ ]\n // FirstPunctuation: pre=[{] sep=[\\n\\n ]\n // SyntaxList:\n // ...\n // CloseBraceToken: pre=[}]\n //\n // or this:\n // ModuleDeclaration:\n // SyntaxList:\n // ExportKeyword: pre=[export] sep=[ ]\n // DeclareKeyword: pre=[declare] sep=[ ]\n // NamespaceKeyword: pre=[namespace] sep=[ ]\n // Identifier: pre=[_PreapprovedNamespace] sep=[ ]\n // ModuleBlock:\n // FirstPunctuation: pre=[{] sep=[\\n\\n ]\n // SyntaxList:\n // ...\n // CloseBraceToken: pre=[}]\n //\n // And reduce it to something like this:\n //\n // // @internal (undocumented)\n // class _PreapprovedClass { /* (preapproved) */ }\n //\n\n let skipRest: boolean = false;\n for (const child of span.children) {\n if (skipRest || child.kind === ts.SyntaxKind.SyntaxList || child.kind === ts.SyntaxKind.JSDocComment) {\n child.modification.skipAll();\n }\n if (child.kind === ts.SyntaxKind.Identifier) {\n skipRest = true;\n child.modification.omitSeparatorAfter = true;\n child.modification.suffix = ' { /* (preapproved) */ }';\n }\n }\n }\n\n /**\n * Writes a synopsis of the AEDoc comments, which indicates the release tag,\n * whether the item has been documented, and any warnings that were detected\n * by the analysis.\n */\n private static _getAedocSynopsis(\n collector: Collector,\n astDeclaration: AstDeclaration,\n messagesToReport: ExtractorMessage[]\n ): string {\n const writer: IndentedWriter = new IndentedWriter();\n\n for (const message of messagesToReport) {\n ApiReportGenerator._writeLineAsComments(writer, 'Warning: ' + message.formatMessageWithoutLocation());\n }\n\n if (!collector.isAncillaryDeclaration(astDeclaration)) {\n const footerParts: string[] = [];\n const apiItemMetadata: ApiItemMetadata = collector.fetchApiItemMetadata(astDeclaration);\n\n // 1. Release tag (if present)\n if (!apiItemMetadata.releaseTagSameAsParent) {\n if (apiItemMetadata.effectiveReleaseTag !== ReleaseTag.None) {\n footerParts.push(ReleaseTag.getTagName(apiItemMetadata.effectiveReleaseTag));\n }\n }\n\n // 2. Enumerate configured tags, reporting standard system tags first and then other configured tags.\n // Note that the ordering we handle the standard tags is important for backwards compatibility.\n // Also note that we had special mechanisms for checking whether or not an item is documented with these tags,\n // so they are checked specially.\n const {\n '@sealed': reportSealedTag,\n '@virtual': reportVirtualTag,\n '@override': reportOverrideTag,\n '@eventProperty': reportEventPropertyTag,\n '@deprecated': reportDeprecatedTag,\n ...otherTagsToReport\n } = collector.extractorConfig.tagsToReport;\n\n // 2.a Check for standard tags and report those that are both configured and present in the metadata.\n if (reportSealedTag && apiItemMetadata.isSealed) {\n footerParts.push('@sealed');\n }\n if (reportVirtualTag && apiItemMetadata.isVirtual) {\n footerParts.push('@virtual');\n }\n if (reportOverrideTag && apiItemMetadata.isOverride) {\n footerParts.push('@override');\n }\n if (reportEventPropertyTag && apiItemMetadata.isEventProperty) {\n footerParts.push('@eventProperty');\n }\n if (reportDeprecatedTag && apiItemMetadata.tsdocComment?.deprecatedBlock) {\n footerParts.push('@deprecated');\n }\n\n // 2.b Check for other configured tags and report those that are present in the tsdoc metadata.\n for (const [tag, reportTag] of Object.entries(otherTagsToReport)) {\n if (reportTag) {\n // If the tag was not handled specially, check if it is present in the metadata.\n if (apiItemMetadata.tsdocComment?.customBlocks.some((block) => block.blockTag.tagName === tag)) {\n footerParts.push(tag);\n } else if (apiItemMetadata.tsdocComment?.modifierTagSet.hasTagName(tag)) {\n footerParts.push(tag);\n }\n }\n }\n\n // 3. If the item is undocumented, append notice at the end of the list\n if (apiItemMetadata.undocumented) {\n footerParts.push('(undocumented)');\n\n collector.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.Undocumented,\n `Missing documentation for \"${astDeclaration.astSymbol.localName}\".`,\n astDeclaration\n );\n }\n\n if (footerParts.length > 0) {\n if (messagesToReport.length > 0) {\n ApiReportGenerator._writeLineAsComments(writer, ''); // skip a line after the warnings\n }\n\n ApiReportGenerator._writeLineAsComments(writer, footerParts.join(' '));\n }\n }\n\n return writer.toString();\n }\n\n private static _writeLineAsComments(writer: IndentedWriter, line: string): void {\n const lines: string[] = Text.convertToLf(line).split('\\n');\n for (const realLine of lines) {\n writer.write('// ');\n writer.write(realLine);\n writer.writeLine();\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ApiReportGenerator.js","sourceRoot":"","sources":["../../src/generators/ApiReportGenerator.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,+CAAiC;AACjC,oEAAmE;AACnE,wEAA4D;AAE5D,sDAAmD;AACnD,qEAAkE;AAClE,2CAAwC;AAExC,+DAA4D;AAE5D,qDAAkD;AAClD,qDAAkD;AAElD,qDAAkD;AAClD,qDAAkD;AAClD,uEAAoE;AAGpE,yFAAsF;AACtF,kEAA+D;AAG/D,MAAa,kBAAkB;IAG7B;;;;;;OAMG;IACI,MAAM,CAAC,4BAA4B,CACxC,iBAAyB,EACzB,mBAA2B;QAE3B,wCAAwC;QACxC,MAAM,gBAAgB,GAAW,iBAAiB,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QAC1E,MAAM,kBAAkB,GAAW,mBAAmB,CAAC,OAAO,CAAC,QAAQ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BH,gDAwmBC;AAvmBgB,oCAAiB,GAAW,OAAO,CAAC","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 ts from 'typescript';\nimport { Text, InternalError } from '@rushstack/node-core-library';\nimport { ReleaseTag } from '@microsoft/api-extractor-model';\n\nimport { Collector } from '../collector/Collector';\nimport { TypeScriptHelpers } from '../analyzer/TypeScriptHelpers';\nimport { Span } from '../analyzer/Span';\nimport type { CollectorEntity } from '../collector/CollectorEntity';\nimport { AstDeclaration } from '../analyzer/AstDeclaration';\nimport type { ApiItemMetadata } from '../collector/ApiItemMetadata';\nimport { AstImport } from '../analyzer/AstImport';\nimport { AstSymbol } from '../analyzer/AstSymbol';\nimport type { ExtractorMessage } from '../api/ExtractorMessage';\nimport { IndentedWriter } from './IndentedWriter';\nimport { DtsEmitHelpers } from './DtsEmitHelpers';\nimport { AstNamespaceImport } from '../analyzer/AstNamespaceImport';\nimport type { AstEntity } from '../analyzer/AstEntity';\nimport type { IAstModuleExportInfo } from '../analyzer/AstModule';\nimport { SourceFileLocationFormatter } from '../analyzer/SourceFileLocationFormatter';\nimport { ExtractorMessageId } from '../api/ExtractorMessageId';\nimport type { ApiReportVariant } from '../api/IConfigFile';\n\nexport class ApiReportGenerator {\n private static _trimSpacesRegExp: RegExp = / +$/gm;\n\n /**\n * Compares the contents of two API files that were created using ApiFileGenerator,\n * and returns true if they are equivalent. Note that these files are not normally edited\n * by a human; the \"equivalence\" comparison here is intended to ignore spurious changes that\n * might be introduced by a tool, e.g. Git newline normalization or an editor that strips\n * whitespace when saving.\n */\n public static areEquivalentApiFileContents(\n actualFileContent: string,\n expectedFileContent: string\n ): boolean {\n // NOTE: \"\\s\" also matches \"\\r\" and \"\\n\"\n const normalizedActual: string = actualFileContent.replace(/[\\s]+/g, ' ');\n const normalizedExpected: string = expectedFileContent.replace(/[\\s]+/g, ' ');\n return normalizedActual === normalizedExpected;\n }\n\n /**\n * Generates and returns the API report contents as a string.\n *\n * @param reportVariant - The release level with which the report is associated.\n * Can also be viewed as the minimal release level of items that should be included in the report.\n */\n public static generateReviewFileContent(collector: Collector, reportVariant: ApiReportVariant): string {\n const writer: IndentedWriter = new IndentedWriter();\n writer.trimLeadingSpaces = true;\n\n function capitalizeFirstLetter(input: string): string {\n return input === '' ? '' : `${input[0].toLocaleUpperCase()}${input.slice(1)}`;\n }\n\n // For backwards compatibility, don't emit \"complete\" in report text for untrimmed reports.\n const releaseLevelPrefix: string =\n reportVariant === 'complete' ? '' : `${capitalizeFirstLetter(reportVariant)} `;\n writer.writeLine(\n [\n `## ${releaseLevelPrefix}API Report File for \"${collector.workingPackage.name}\"`,\n ``,\n `> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).`,\n ``\n ].join('\\n')\n );\n\n // Write the opening delimiter for the Markdown code fence\n writer.writeLine('```ts\\n');\n\n // Emit the triple slash directives\n for (const typeDirectiveReference of Array.from(collector.dtsTypeReferenceDirectives).sort()) {\n // https://github.com/microsoft/TypeScript/blob/611ebc7aadd7a44a4c0447698bfda9222a78cb66/src/compiler/declarationEmitter.ts#L162\n writer.writeLine(`/// <reference types=\"${typeDirectiveReference}\" />`);\n }\n for (const libDirectiveReference of Array.from(collector.dtsLibReferenceDirectives).sort()) {\n writer.writeLine(`/// <reference lib=\"${libDirectiveReference}\" />`);\n }\n writer.ensureSkippedLine();\n\n // Emit the imports\n for (const entity of collector.entities) {\n if (entity.astEntity instanceof AstImport) {\n DtsEmitHelpers.emitImport(writer, entity, entity.astEntity);\n }\n }\n writer.ensureSkippedLine();\n\n // Emit the regular declarations\n for (const entity of collector.entities) {\n const astEntity: AstEntity = entity.astEntity;\n if (entity.consumable || collector.extractorConfig.apiReportIncludeForgottenExports) {\n // First, collect the list of export names for this symbol. When reporting messages with\n // ExtractorMessage.properties.exportName, this will enable us to emit the warning comments alongside\n // the associated export statement.\n interface IExportToEmit {\n readonly exportName: string;\n readonly associatedMessages: ExtractorMessage[];\n }\n const exportsToEmit: Map<string, IExportToEmit> = new Map<string, IExportToEmit>();\n\n for (const exportName of entity.exportNames) {\n if (!entity.shouldInlineExport) {\n exportsToEmit.set(exportName, { exportName, associatedMessages: [] });\n }\n }\n\n if (astEntity instanceof AstSymbol) {\n // Emit all the declarations for this entity\n for (const astDeclaration of astEntity.astDeclarations || []) {\n // Get the messages associated with this declaration\n const fetchedMessages: ExtractorMessage[] =\n collector.messageRouter.fetchAssociatedMessagesForReviewFile(astDeclaration);\n\n // Peel off the messages associated with an export statement and store them\n // in IExportToEmit.associatedMessages (to be processed later). The remaining messages will\n // added to messagesToReport, to be emitted next to the declaration instead of the export statement.\n const messagesToReport: ExtractorMessage[] = [];\n for (const message of fetchedMessages) {\n if (message.properties.exportName) {\n const exportToEmit: IExportToEmit | undefined = exportsToEmit.get(\n message.properties.exportName\n );\n if (exportToEmit) {\n exportToEmit.associatedMessages.push(message);\n continue;\n }\n }\n messagesToReport.push(message);\n }\n\n if (this._shouldIncludeInReport(collector, astDeclaration, reportVariant)) {\n writer.ensureSkippedLine();\n writer.write(ApiReportGenerator._getAedocSynopsis(collector, astDeclaration, messagesToReport));\n\n const span: Span = new Span(astDeclaration.declaration);\n\n const apiItemMetadata: ApiItemMetadata = collector.fetchApiItemMetadata(astDeclaration);\n if (apiItemMetadata.isPreapproved) {\n ApiReportGenerator._modifySpanForPreapproved(span);\n } else {\n ApiReportGenerator._modifySpan(collector, span, entity, astDeclaration, false, reportVariant);\n }\n\n span.writeModifiedText(writer);\n writer.ensureNewLine();\n }\n }\n }\n\n if (astEntity instanceof AstNamespaceImport) {\n const astModuleExportInfo: IAstModuleExportInfo = astEntity.fetchAstModuleExportInfo(collector);\n\n if (entity.nameForEmit === undefined) {\n // This should never happen\n throw new InternalError('referencedEntry.nameForEmit is undefined');\n }\n\n if (astModuleExportInfo.starExportedExternalModules.size > 0) {\n // We could support this, but we would need to find a way to safely represent it.\n throw new Error(\n `The ${entity.nameForEmit} namespace import includes a star export, which is not supported:\\n` +\n SourceFileLocationFormatter.formatDeclaration(astEntity.declaration)\n );\n }\n\n // Emit a synthetic declaration for the namespace. It will look like this:\n //\n // declare namespace example {\n // export {\n // f1,\n // f2\n // }\n // }\n //\n // Note that we do not try to relocate f1()/f2() to be inside the namespace because other type\n // signatures may reference them directly (without using the namespace qualifier).\n\n writer.ensureSkippedLine();\n writer.writeLine(`declare namespace ${entity.nameForEmit} {`);\n\n // all local exports of local imported module are just references to top-level declarations\n writer.increaseIndent();\n writer.writeLine('export {');\n writer.increaseIndent();\n\n const exportClauses: string[] = [];\n for (const [exportedName, exportedEntity] of astModuleExportInfo.exportedLocalEntities) {\n const collectorEntity: CollectorEntity | undefined =\n collector.tryGetCollectorEntity(exportedEntity);\n if (collectorEntity === undefined) {\n // This should never happen\n // top-level exports of local imported module should be added as collector entities before\n throw new InternalError(\n `Cannot find collector entity for ${entity.nameForEmit}.${exportedEntity.localName}`\n );\n }\n\n if (collectorEntity.nameForEmit === exportedName) {\n exportClauses.push(collectorEntity.nameForEmit);\n } else {\n exportClauses.push(`${collectorEntity.nameForEmit} as ${exportedName}`);\n }\n }\n writer.writeLine(exportClauses.join(',\\n'));\n\n writer.decreaseIndent();\n writer.writeLine('}'); // end of \"export { ... }\"\n writer.decreaseIndent();\n writer.writeLine('}'); // end of \"declare namespace { ... }\"\n }\n\n // Now emit the export statements for this entity.\n for (const exportToEmit of exportsToEmit.values()) {\n // Write any associated messages\n if (exportToEmit.associatedMessages.length > 0) {\n writer.ensureSkippedLine();\n for (const message of exportToEmit.associatedMessages) {\n ApiReportGenerator._writeLineAsComments(\n writer,\n 'Warning: ' + message.formatMessageWithoutLocation()\n );\n }\n }\n\n DtsEmitHelpers.emitNamedExport(writer, exportToEmit.exportName, entity);\n }\n writer.ensureSkippedLine();\n }\n }\n\n DtsEmitHelpers.emitStarExports(writer, collector);\n\n // Write the unassociated warnings at the bottom of the file\n const unassociatedMessages: ExtractorMessage[] =\n collector.messageRouter.fetchUnassociatedMessagesForReviewFile();\n if (unassociatedMessages.length > 0) {\n writer.ensureSkippedLine();\n ApiReportGenerator._writeLineAsComments(writer, 'Warnings were encountered during analysis:');\n ApiReportGenerator._writeLineAsComments(writer, '');\n for (const unassociatedMessage of unassociatedMessages) {\n ApiReportGenerator._writeLineAsComments(\n writer,\n unassociatedMessage.formatMessageWithLocation(collector.workingPackage.packageFolder)\n );\n }\n }\n\n if (collector.workingPackage.tsdocComment === undefined) {\n writer.ensureSkippedLine();\n ApiReportGenerator._writeLineAsComments(writer, '(No @packageDocumentation comment for this package)');\n }\n\n // Write the closing delimiter for the Markdown code fence\n writer.ensureSkippedLine();\n writer.writeLine('```');\n\n // Remove any trailing spaces\n return writer.toString().replace(ApiReportGenerator._trimSpacesRegExp, '');\n }\n\n /**\n * Before writing out a declaration, _modifySpan() applies various fixups to make it nice.\n */\n private static _modifySpan(\n collector: Collector,\n span: Span,\n entity: CollectorEntity,\n astDeclaration: AstDeclaration,\n insideTypeLiteral: boolean,\n reportVariant: ApiReportVariant\n ): void {\n // Should we process this declaration at all?\n // eslint-disable-next-line no-bitwise\n if (!ApiReportGenerator._shouldIncludeInReport(collector, astDeclaration, reportVariant)) {\n span.modification.skipAll();\n return;\n }\n\n const previousSpan: Span | undefined = span.previousSibling;\n\n let recurseChildren: boolean = true;\n let sortChildren: boolean = false;\n\n switch (span.kind) {\n case ts.SyntaxKind.JSDocComment:\n span.modification.skipAll();\n // For now, we don't transform JSDoc comment nodes at all\n recurseChildren = false;\n break;\n\n case ts.SyntaxKind.ExportKeyword:\n case ts.SyntaxKind.DefaultKeyword:\n case ts.SyntaxKind.DeclareKeyword:\n // Delete any explicit \"export\" or \"declare\" keywords -- we will re-add them below\n span.modification.skipAll();\n break;\n\n case ts.SyntaxKind.InterfaceKeyword:\n case ts.SyntaxKind.ClassKeyword:\n case ts.SyntaxKind.EnumKeyword:\n case ts.SyntaxKind.NamespaceKeyword:\n case ts.SyntaxKind.ModuleKeyword:\n case ts.SyntaxKind.TypeKeyword:\n case ts.SyntaxKind.FunctionKeyword:\n // Replace the stuff we possibly deleted above\n let replacedModifiers: string = '';\n\n if (entity.shouldInlineExport) {\n replacedModifiers = 'export ' + replacedModifiers;\n }\n\n if (previousSpan && previousSpan.kind === ts.SyntaxKind.SyntaxList) {\n // If there is a previous span of type SyntaxList, then apply it before any other modifiers\n // (e.g. \"abstract\") that appear there.\n previousSpan.modification.prefix = replacedModifiers + previousSpan.modification.prefix;\n } else {\n // Otherwise just stick it in front of this span\n span.modification.prefix = replacedModifiers + span.modification.prefix;\n }\n break;\n\n case ts.SyntaxKind.SyntaxList:\n if (span.parent) {\n if (AstDeclaration.isSupportedSyntaxKind(span.parent.kind)) {\n // If the immediate parent is an API declaration, and the immediate children are API declarations,\n // then sort the children alphabetically\n sortChildren = true;\n } else if (span.parent.kind === ts.SyntaxKind.ModuleBlock) {\n // Namespaces are special because their chain goes ModuleDeclaration -> ModuleBlock -> SyntaxList\n sortChildren = true;\n }\n }\n break;\n\n case ts.SyntaxKind.VariableDeclaration:\n if (!span.parent) {\n // The VariableDeclaration node is part of a VariableDeclarationList, however\n // the Entry.followedSymbol points to the VariableDeclaration part because\n // multiple definitions might share the same VariableDeclarationList.\n //\n // Since we are emitting a separate declaration for each one, we need to look upwards\n // in the ts.Node tree and write a copy of the enclosing VariableDeclarationList\n // content (e.g. \"var\" from \"var x=1, y=2\").\n const list: ts.VariableDeclarationList | undefined = TypeScriptHelpers.matchAncestor(span.node, [\n ts.SyntaxKind.VariableDeclarationList,\n ts.SyntaxKind.VariableDeclaration\n ]);\n if (!list) {\n // This should not happen unless the compiler API changes somehow\n throw new InternalError('Unsupported variable declaration');\n }\n const listPrefix: string = list\n .getSourceFile()\n .text.substring(list.getStart(), list.declarations[0].getStart());\n span.modification.prefix = listPrefix + span.modification.prefix;\n span.modification.suffix = ';';\n\n if (entity.shouldInlineExport) {\n span.modification.prefix = 'export ' + span.modification.prefix;\n }\n }\n break;\n\n case ts.SyntaxKind.Identifier:\n const referencedEntity: CollectorEntity | undefined = collector.tryGetEntityForNode(\n span.node as ts.Identifier\n );\n\n if (referencedEntity) {\n if (!referencedEntity.nameForEmit) {\n // This should never happen\n throw new InternalError('referencedEntry.nameForEmit is undefined');\n }\n\n span.modification.prefix = referencedEntity.nameForEmit;\n // For debugging:\n // span.modification.prefix += '/*R=FIX*/';\n } else {\n // For debugging:\n // span.modification.prefix += '/*R=KEEP*/';\n }\n\n break;\n\n case ts.SyntaxKind.TypeLiteral:\n insideTypeLiteral = true;\n break;\n\n case ts.SyntaxKind.ImportType:\n DtsEmitHelpers.modifyImportTypeSpan(\n collector,\n span,\n astDeclaration,\n (childSpan, childAstDeclaration) => {\n ApiReportGenerator._modifySpan(\n collector,\n childSpan,\n entity,\n childAstDeclaration,\n insideTypeLiteral,\n reportVariant\n );\n }\n );\n break;\n }\n\n if (recurseChildren) {\n for (const child of span.children) {\n let childAstDeclaration: AstDeclaration = astDeclaration;\n\n if (AstDeclaration.isSupportedSyntaxKind(child.kind)) {\n childAstDeclaration = collector.astSymbolTable.getChildAstDeclarationByNode(\n child.node,\n astDeclaration\n );\n\n if (ApiReportGenerator._shouldIncludeInReport(collector, childAstDeclaration, reportVariant)) {\n if (sortChildren) {\n span.modification.sortChildren = true;\n child.modification.sortKey = Collector.getSortKeyIgnoringUnderscore(\n childAstDeclaration.astSymbol.localName\n );\n }\n\n if (!insideTypeLiteral) {\n const messagesToReport: ExtractorMessage[] =\n collector.messageRouter.fetchAssociatedMessagesForReviewFile(childAstDeclaration);\n\n // NOTE: This generates ae-undocumented messages as a side effect\n const aedocSynopsis: string = ApiReportGenerator._getAedocSynopsis(\n collector,\n childAstDeclaration,\n messagesToReport\n );\n\n child.modification.prefix = aedocSynopsis + child.modification.prefix;\n }\n }\n }\n\n ApiReportGenerator._modifySpan(\n collector,\n child,\n entity,\n childAstDeclaration,\n insideTypeLiteral,\n reportVariant\n );\n }\n }\n }\n\n private static _shouldIncludeInReport(\n collector: Collector,\n astDeclaration: AstDeclaration,\n reportVariant: ApiReportVariant\n ): boolean {\n // Private declarations are not included in the API report\n // eslint-disable-next-line no-bitwise\n if ((astDeclaration.modifierFlags & ts.ModifierFlags.Private) !== 0) {\n return false;\n }\n\n const apiItemMetadata: ApiItemMetadata = collector.fetchApiItemMetadata(astDeclaration);\n\n // No specified release tag is considered the same as `@public`.\n const releaseTag: ReleaseTag =\n apiItemMetadata.effectiveReleaseTag === ReleaseTag.None\n ? ReleaseTag.Public\n : apiItemMetadata.effectiveReleaseTag;\n\n // If the declaration has a release tag that is not in scope, omit it from the report.\n switch (reportVariant) {\n case 'complete':\n return true;\n case 'alpha':\n return releaseTag >= ReleaseTag.Alpha;\n case 'beta':\n return releaseTag >= ReleaseTag.Beta;\n case 'public':\n return releaseTag === ReleaseTag.Public;\n default:\n throw new Error(`Unrecognized release level: ${reportVariant}`);\n }\n }\n\n /**\n * For declarations marked as `@preapproved`, this is used instead of _modifySpan().\n */\n private static _modifySpanForPreapproved(span: Span): void {\n // Match something like this:\n //\n // ClassDeclaration:\n // SyntaxList:\n // ExportKeyword: pre=[export] sep=[ ]\n // DeclareKeyword: pre=[declare] sep=[ ]\n // ClassKeyword: pre=[class] sep=[ ]\n // Identifier: pre=[_PreapprovedClass] sep=[ ]\n // FirstPunctuation: pre=[{] sep=[\\n\\n ]\n // SyntaxList:\n // ...\n // CloseBraceToken: pre=[}]\n //\n // or this:\n // ModuleDeclaration:\n // SyntaxList:\n // ExportKeyword: pre=[export] sep=[ ]\n // DeclareKeyword: pre=[declare] sep=[ ]\n // NamespaceKeyword: pre=[namespace] sep=[ ]\n // Identifier: pre=[_PreapprovedNamespace] sep=[ ]\n // ModuleBlock:\n // FirstPunctuation: pre=[{] sep=[\\n\\n ]\n // SyntaxList:\n // ...\n // CloseBraceToken: pre=[}]\n //\n // And reduce it to something like this:\n //\n // // @internal (undocumented)\n // class _PreapprovedClass { /* (preapproved) */ }\n //\n\n let skipRest: boolean = false;\n for (const child of span.children) {\n if (skipRest || child.kind === ts.SyntaxKind.SyntaxList || child.kind === ts.SyntaxKind.JSDocComment) {\n child.modification.skipAll();\n }\n if (child.kind === ts.SyntaxKind.Identifier) {\n skipRest = true;\n child.modification.omitSeparatorAfter = true;\n child.modification.suffix = ' { /* (preapproved) */ }';\n }\n }\n }\n\n /**\n * Writes a synopsis of the AEDoc comments, which indicates the release tag,\n * whether the item has been documented, and any warnings that were detected\n * by the analysis.\n */\n private static _getAedocSynopsis(\n collector: Collector,\n astDeclaration: AstDeclaration,\n messagesToReport: ExtractorMessage[]\n ): string {\n const writer: IndentedWriter = new IndentedWriter();\n\n for (const message of messagesToReport) {\n ApiReportGenerator._writeLineAsComments(writer, 'Warning: ' + message.formatMessageWithoutLocation());\n }\n\n if (!collector.isAncillaryDeclaration(astDeclaration)) {\n const footerParts: string[] = [];\n const apiItemMetadata: ApiItemMetadata = collector.fetchApiItemMetadata(astDeclaration);\n\n // 1. Release tag (if present)\n if (!apiItemMetadata.releaseTagSameAsParent) {\n if (apiItemMetadata.effectiveReleaseTag !== ReleaseTag.None) {\n footerParts.push(ReleaseTag.getTagName(apiItemMetadata.effectiveReleaseTag));\n }\n }\n\n // 2. Enumerate configured tags, reporting standard system tags first and then other configured tags.\n // Note that the ordering we handle the standard tags is important for backwards compatibility.\n // Also note that we had special mechanisms for checking whether or not an item is documented with these tags,\n // so they are checked specially.\n const {\n '@sealed': reportSealedTag,\n '@virtual': reportVirtualTag,\n '@override': reportOverrideTag,\n '@eventProperty': reportEventPropertyTag,\n '@deprecated': reportDeprecatedTag,\n ...otherTagsToReport\n } = collector.extractorConfig.tagsToReport;\n\n // 2.a Check for standard tags and report those that are both configured and present in the metadata.\n if (reportSealedTag && apiItemMetadata.isSealed) {\n footerParts.push('@sealed');\n }\n if (reportVirtualTag && apiItemMetadata.isVirtual) {\n footerParts.push('@virtual');\n }\n if (reportOverrideTag && apiItemMetadata.isOverride) {\n footerParts.push('@override');\n }\n if (reportEventPropertyTag && apiItemMetadata.isEventProperty) {\n footerParts.push('@eventProperty');\n }\n if (reportDeprecatedTag && apiItemMetadata.tsdocComment?.deprecatedBlock) {\n footerParts.push('@deprecated');\n }\n\n // 2.b Check for other configured tags and report those that are present in the tsdoc metadata.\n for (const [tag, reportTag] of Object.entries(otherTagsToReport)) {\n if (reportTag) {\n // If the tag was not handled specially, check if it is present in the metadata.\n if (apiItemMetadata.tsdocComment?.customBlocks.some((block) => block.blockTag.tagName === tag)) {\n footerParts.push(tag);\n } else if (apiItemMetadata.tsdocComment?.modifierTagSet.hasTagName(tag)) {\n footerParts.push(tag);\n }\n }\n }\n\n // 3. If the item is undocumented, append notice at the end of the list\n if (apiItemMetadata.undocumented) {\n footerParts.push('(undocumented)');\n\n collector.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.Undocumented,\n `Missing documentation for \"${astDeclaration.astSymbol.localName}\".`,\n astDeclaration\n );\n }\n\n if (footerParts.length > 0) {\n if (messagesToReport.length > 0) {\n ApiReportGenerator._writeLineAsComments(writer, ''); // skip a line after the warnings\n }\n\n ApiReportGenerator._writeLineAsComments(writer, footerParts.join(' '));\n }\n }\n\n return writer.toString();\n }\n\n private static _writeLineAsComments(writer: IndentedWriter, line: string): void {\n const lines: string[] = Text.convertToLf(line).split('\\n');\n for (const realLine of lines) {\n writer.write('// ');\n writer.write(realLine);\n writer.writeLine();\n }\n }\n}\n"]}
|