@microsoft/api-extractor 7.52.14 → 7.53.0
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 +50 -0
- package/CHANGELOG.md +13 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/aedoc/PackageDocComment.d.ts.map +1 -1
- package/lib/aedoc/PackageDocComment.js.map +1 -1
- package/lib/analyzer/AstDeclaration.d.ts.map +1 -1
- package/lib/analyzer/AstDeclaration.js +1 -1
- package/lib/analyzer/AstDeclaration.js.map +1 -1
- package/lib/analyzer/AstImport.d.ts.map +1 -1
- package/lib/analyzer/AstImport.js.map +1 -1
- package/lib/analyzer/AstReferenceResolver.d.ts.map +1 -1
- package/lib/analyzer/AstReferenceResolver.js.map +1 -1
- package/lib/analyzer/AstSymbol.d.ts.map +1 -1
- package/lib/analyzer/AstSymbol.js.map +1 -1
- package/lib/analyzer/AstSymbolTable.d.ts.map +1 -1
- package/lib/analyzer/AstSymbolTable.js.map +1 -1
- package/lib/analyzer/ExportAnalyzer.d.ts.map +1 -1
- package/lib/analyzer/ExportAnalyzer.js.map +1 -1
- package/lib/analyzer/PackageMetadataManager.d.ts.map +1 -1
- package/lib/analyzer/PackageMetadataManager.js +11 -11
- package/lib/analyzer/PackageMetadataManager.js.map +1 -1
- package/lib/analyzer/SourceFileLocationFormatter.d.ts.map +1 -1
- package/lib/analyzer/SourceFileLocationFormatter.js +1 -1
- package/lib/analyzer/SourceFileLocationFormatter.js.map +1 -1
- package/lib/analyzer/Span.d.ts.map +1 -1
- package/lib/analyzer/Span.js.map +1 -1
- package/lib/analyzer/TypeScriptHelpers.d.ts.map +1 -1
- package/lib/analyzer/TypeScriptHelpers.js +1 -1
- package/lib/analyzer/TypeScriptHelpers.js.map +1 -1
- package/lib/analyzer/TypeScriptInternals.d.ts.map +1 -1
- package/lib/analyzer/TypeScriptInternals.js.map +1 -1
- package/lib/api/CompilerState.d.ts.map +1 -1
- package/lib/api/CompilerState.js +2 -2
- package/lib/api/CompilerState.js.map +1 -1
- package/lib/api/Extractor.d.ts.map +1 -1
- package/lib/api/Extractor.js +2 -2
- package/lib/api/Extractor.js.map +1 -1
- package/lib/api/ExtractorConfig.d.ts +2 -2
- package/lib/api/ExtractorConfig.d.ts.map +1 -1
- package/lib/api/ExtractorConfig.js +3 -3
- package/lib/api/ExtractorConfig.js.map +1 -1
- package/lib/api/ExtractorMessage.d.ts.map +1 -1
- package/lib/api/ExtractorMessage.js.map +1 -1
- package/lib/api/IConfigFile.d.ts.map +1 -1
- package/lib/api/IConfigFile.js.map +1 -1
- package/lib/cli/ApiExtractorCommandLine.js +1 -1
- package/lib/cli/ApiExtractorCommandLine.js.map +1 -1
- package/lib/cli/InitAction.d.ts.map +1 -1
- package/lib/cli/InitAction.js +1 -1
- package/lib/cli/InitAction.js.map +1 -1
- package/lib/cli/RunAction.d.ts.map +1 -1
- package/lib/cli/RunAction.js +2 -2
- package/lib/cli/RunAction.js.map +1 -1
- package/lib/collector/ApiItemMetadata.d.ts.map +1 -1
- package/lib/collector/ApiItemMetadata.js.map +1 -1
- package/lib/collector/Collector.d.ts.map +1 -1
- package/lib/collector/Collector.js +2 -2
- package/lib/collector/Collector.js.map +1 -1
- package/lib/collector/CollectorEntity.d.ts.map +1 -1
- package/lib/collector/CollectorEntity.js +1 -1
- package/lib/collector/CollectorEntity.js.map +1 -1
- package/lib/collector/DeclarationMetadata.d.ts.map +1 -1
- package/lib/collector/DeclarationMetadata.js.map +1 -1
- package/lib/collector/MessageRouter.d.ts.map +1 -1
- package/lib/collector/MessageRouter.js.map +1 -1
- package/lib/collector/SourceMapper.d.ts.map +1 -1
- package/lib/collector/SourceMapper.js +1 -1
- package/lib/collector/SourceMapper.js.map +1 -1
- package/lib/collector/WorkingPackage.d.ts.map +1 -1
- package/lib/collector/WorkingPackage.js.map +1 -1
- package/lib/enhancers/DocCommentEnhancer.d.ts.map +1 -1
- package/lib/enhancers/DocCommentEnhancer.js +1 -1
- package/lib/enhancers/DocCommentEnhancer.js.map +1 -1
- package/lib/enhancers/ValidationEnhancer.d.ts.map +1 -1
- package/lib/enhancers/ValidationEnhancer.js +2 -2
- package/lib/enhancers/ValidationEnhancer.js.map +1 -1
- package/lib/generators/ApiModelGenerator.d.ts.map +1 -1
- package/lib/generators/ApiModelGenerator.js +1 -1
- package/lib/generators/ApiModelGenerator.js.map +1 -1
- package/lib/generators/ApiReportGenerator.d.ts.map +1 -1
- package/lib/generators/ApiReportGenerator.js +1 -1
- package/lib/generators/ApiReportGenerator.js.map +1 -1
- package/lib/generators/DeclarationReferenceGenerator.d.ts.map +1 -1
- package/lib/generators/DeclarationReferenceGenerator.js.map +1 -1
- package/lib/generators/DtsEmitHelpers.d.ts.map +1 -1
- package/lib/generators/DtsEmitHelpers.js.map +1 -1
- package/lib/generators/DtsRollupGenerator.d.ts.map +1 -1
- package/lib/generators/DtsRollupGenerator.js +1 -1
- package/lib/generators/DtsRollupGenerator.js.map +1 -1
- package/lib/generators/ExcerptBuilder.d.ts.map +1 -1
- package/lib/generators/ExcerptBuilder.js.map +1 -1
- package/lib/start.js +1 -1
- package/lib/start.js.map +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationEnhancer.js","sourceRoot":"","sources":["../../src/enhancers/ValidationEnhancer.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,2CAA6B;AAC7B,+CAAiC;AAGjC,qDAAkD;AAKlD,kEAA+D;AAC/D,wEAA4D;AAC5D,uEAAoE;AAIpE,MAAa,kBAAkB;IACtB,MAAM,CAAC,OAAO,CAAC,SAAoB;QACxC,MAAM,qBAAqB,GAAmB,IAAI,GAAG,EAAa,CAAC;QAEnE,KAAK,MAAM,MAAM,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;YACxC,IACE,CAAC,CACC,MAAM,CAAC,UAAU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Aa,CAAC,gBAAgB,CACtC,uCAAkB,CAAC,eAAe,EAClC,eAAe,SAAS,6CAA6C,kBAAkB,EAAE,EACzF,cAAc,CACf,CAAC;oBACJ,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,+EAA+E;IAC/E,EAAE;IACF,sDAAsD;IAC9C,MAAM,CAAC,mBAAmB,CAAC,SAAoB;QACrD,IAAI,SAAS,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3C,OAAO,KAAK,CAAC;QACf,CAAC;QAED,oCAAoC;QACpC,EAAE;QACF,yBAAyB;QACzB,kCAAkC;QAClC,mCAAmC;QACnC,oBAAoB;QACpB,6CAA6C;QAC7C,qCAAqC;QACrC,MAAM,cAAc,GAAmB,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QACpE,IAAI,EAAE,CAAC,qBAAqB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,CAAC;YACzD,MAAM,gBAAgB,GAA4B,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC;YAClF,IAAI,gBAAgB,EAAE,CAAC;gBACrB,KAAK,MAAM,KAAK,IAAI,gBAAgB,CAAC,WAAW,EAAE,EAAE,CAAC;oBACnD,IAAI,KAAK,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC;wBAC/C,OAAO,IAAI,CAAC;oBACd,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA3RD,gDA2RC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as path from 'path';\nimport * as ts from 'typescript';\n\nimport type { Collector } from '../collector/Collector';\nimport { AstSymbol } from '../analyzer/AstSymbol';\nimport type { AstDeclaration } from '../analyzer/AstDeclaration';\nimport type { ApiItemMetadata } from '../collector/ApiItemMetadata';\nimport type { SymbolMetadata } from '../collector/SymbolMetadata';\nimport type { CollectorEntity } from '../collector/CollectorEntity';\nimport { ExtractorMessageId } from '../api/ExtractorMessageId';\nimport { ReleaseTag } from '@microsoft/api-extractor-model';\nimport { AstNamespaceImport } from '../analyzer/AstNamespaceImport';\nimport type { IAstModuleExportInfo } from '../analyzer/AstModule';\nimport type { AstEntity } from '../analyzer/AstEntity';\n\nexport class ValidationEnhancer {\n public static analyze(collector: Collector): void {\n const alreadyWarnedEntities: Set<AstEntity> = new Set<AstEntity>();\n\n for (const entity of collector.entities) {\n if (\n !(\n entity.consumable ||\n collector.extractorConfig.apiReportIncludeForgottenExports ||\n collector.extractorConfig.docModelIncludeForgottenExports\n )\n ) {\n continue;\n }\n\n if (entity.astEntity instanceof AstSymbol) {\n // A regular exported AstSymbol\n\n const astSymbol: AstSymbol = entity.astEntity;\n\n astSymbol.forEachDeclarationRecursive((astDeclaration: AstDeclaration) => {\n ValidationEnhancer._checkReferences(collector, astDeclaration, alreadyWarnedEntities);\n });\n\n const symbolMetadata: SymbolMetadata = collector.fetchSymbolMetadata(astSymbol);\n ValidationEnhancer._checkForInternalUnderscore(collector, entity, astSymbol, symbolMetadata);\n ValidationEnhancer._checkForInconsistentReleaseTags(collector, astSymbol, symbolMetadata);\n } else if (entity.astEntity instanceof AstNamespaceImport) {\n // A namespace created using \"import * as ___ from ___\"\n const astNamespaceImport: AstNamespaceImport = entity.astEntity;\n\n const astModuleExportInfo: IAstModuleExportInfo =\n astNamespaceImport.fetchAstModuleExportInfo(collector);\n\n for (const namespaceMemberAstEntity of astModuleExportInfo.exportedLocalEntities.values()) {\n if (namespaceMemberAstEntity instanceof AstSymbol) {\n const astSymbol: AstSymbol = namespaceMemberAstEntity;\n\n astSymbol.forEachDeclarationRecursive((astDeclaration: AstDeclaration) => {\n ValidationEnhancer._checkReferences(collector, astDeclaration, alreadyWarnedEntities);\n });\n\n const symbolMetadata: SymbolMetadata = collector.fetchSymbolMetadata(astSymbol);\n\n // (Don't apply ValidationEnhancer._checkForInternalUnderscore() for AstNamespaceImport members)\n\n ValidationEnhancer._checkForInconsistentReleaseTags(collector, astSymbol, symbolMetadata);\n }\n }\n }\n }\n }\n\n private static _checkForInternalUnderscore(\n collector: Collector,\n collectorEntity: CollectorEntity,\n astSymbol: AstSymbol,\n symbolMetadata: SymbolMetadata\n ): void {\n let needsUnderscore: boolean = false;\n\n if (symbolMetadata.maxEffectiveReleaseTag === ReleaseTag.Internal) {\n if (!astSymbol.parentAstSymbol) {\n // If it's marked as @internal and has no parent, then it needs an underscore.\n // We use maxEffectiveReleaseTag because a merged declaration would NOT need an underscore in a case like this:\n //\n // /** @public */\n // export enum X { }\n //\n // /** @internal */\n // export namespace X { }\n //\n // (The above normally reports an error \"ae-different-release-tags\", but that may be suppressed.)\n needsUnderscore = true;\n } else {\n // If it's marked as @internal and the parent isn't obviously already @internal, then it needs an underscore.\n //\n // For example, we WOULD need an underscore for a merged declaration like this:\n //\n // /** @internal */\n // export namespace X {\n // export interface _Y { }\n // }\n //\n // /** @public */\n // export class X {\n // /** @internal */\n // public static _Y(): void { } // <==== different from parent\n // }\n const parentSymbolMetadata: SymbolMetadata = collector.fetchSymbolMetadata(astSymbol);\n if (parentSymbolMetadata.maxEffectiveReleaseTag > ReleaseTag.Internal) {\n needsUnderscore = true;\n }\n }\n }\n\n if (needsUnderscore) {\n for (const exportName of collectorEntity.exportNames) {\n if (exportName[0] !== '_') {\n collector.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.InternalMissingUnderscore,\n `The name \"${exportName}\" should be prefixed with an underscore` +\n ` because the declaration is marked as @internal`,\n astSymbol,\n { exportName }\n );\n }\n }\n }\n }\n\n private static _checkForInconsistentReleaseTags(\n collector: Collector,\n astSymbol: AstSymbol,\n symbolMetadata: SymbolMetadata\n ): void {\n if (astSymbol.isExternal) {\n // For now, don't report errors for external code. If the developer cares about it, they should run\n // API Extractor separately on the external project\n return;\n }\n\n // Normally we will expect all release tags to be the same. Arbitrarily we choose the maxEffectiveReleaseTag\n // as the thing they should all match.\n const expectedEffectiveReleaseTag: ReleaseTag = symbolMetadata.maxEffectiveReleaseTag;\n\n // This is set to true if we find a declaration whose release tag is different from expectedEffectiveReleaseTag\n let mixedReleaseTags: boolean = false;\n\n // This is set to false if we find a declaration that is not a function/method overload\n let onlyFunctionOverloads: boolean = true;\n\n // This is set to true if we find a declaration that is @internal\n let anyInternalReleaseTags: boolean = false;\n\n for (const astDeclaration of astSymbol.astDeclarations) {\n const apiItemMetadata: ApiItemMetadata = collector.fetchApiItemMetadata(astDeclaration);\n const effectiveReleaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n\n switch (astDeclaration.declaration.kind) {\n case ts.SyntaxKind.FunctionDeclaration:\n case ts.SyntaxKind.MethodDeclaration:\n break;\n default:\n onlyFunctionOverloads = false;\n }\n\n if (effectiveReleaseTag !== expectedEffectiveReleaseTag) {\n mixedReleaseTags = true;\n }\n\n if (effectiveReleaseTag === ReleaseTag.Internal) {\n anyInternalReleaseTags = true;\n }\n }\n\n if (mixedReleaseTags) {\n if (!onlyFunctionOverloads) {\n collector.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.DifferentReleaseTags,\n 'This symbol has another declaration with a different release tag',\n astSymbol\n );\n }\n\n if (anyInternalReleaseTags) {\n collector.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.InternalMixedReleaseTag,\n `Mixed release tags are not allowed for \"${astSymbol.localName}\" because one of its declarations` +\n ` is marked as @internal`,\n astSymbol\n );\n }\n }\n }\n\n private static _checkReferences(\n collector: Collector,\n astDeclaration: AstDeclaration,\n alreadyWarnedEntities: Set<AstEntity>\n ): void {\n const apiItemMetadata: ApiItemMetadata = collector.fetchApiItemMetadata(astDeclaration);\n const declarationReleaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n\n for (const referencedEntity of astDeclaration.referencedAstEntities) {\n let collectorEntity: CollectorEntity | undefined;\n let referencedReleaseTag: ReleaseTag;\n let localName: string;\n\n if (referencedEntity instanceof AstSymbol) {\n // If this is e.g. a member of a namespace, then we need to be checking the top-level scope to see\n // whether it's exported.\n //\n // TODO: Technically we should also check each of the nested scopes along the way.\n const rootSymbol: AstSymbol = referencedEntity.rootAstSymbol;\n\n if (rootSymbol.isExternal) {\n continue;\n }\n\n collectorEntity = collector.tryGetCollectorEntity(rootSymbol);\n localName = collectorEntity?.nameForEmit || rootSymbol.localName;\n\n const referencedMetadata: SymbolMetadata = collector.fetchSymbolMetadata(referencedEntity);\n referencedReleaseTag = referencedMetadata.maxEffectiveReleaseTag;\n } else if (referencedEntity instanceof AstNamespaceImport) {\n collectorEntity = collector.tryGetCollectorEntity(referencedEntity);\n\n // TODO: Currently the \"import * as ___ from ___\" syntax does not yet support doc comments\n referencedReleaseTag = ReleaseTag.Public;\n\n localName = collectorEntity?.nameForEmit || referencedEntity.localName;\n } else {\n continue;\n }\n\n if (collectorEntity && collectorEntity.consumable) {\n if (ReleaseTag.compare(declarationReleaseTag, referencedReleaseTag) > 0) {\n collector.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.IncompatibleReleaseTags,\n `The symbol \"${astDeclaration.astSymbol.localName}\"` +\n ` is marked as ${ReleaseTag.getTagName(declarationReleaseTag)},` +\n ` but its signature references \"${localName}\"` +\n ` which is marked as ${ReleaseTag.getTagName(referencedReleaseTag)}`,\n astDeclaration\n );\n }\n } else {\n const entryPointFilename: string = path.basename(\n collector.workingPackage.entryPointSourceFile.fileName\n );\n\n if (!alreadyWarnedEntities.has(referencedEntity)) {\n alreadyWarnedEntities.add(referencedEntity);\n\n if (\n referencedEntity instanceof AstSymbol &&\n ValidationEnhancer._isEcmaScriptSymbol(referencedEntity)\n ) {\n // The main usage scenario for ECMAScript symbols is to attach private data to a JavaScript object,\n // so as a special case, we do NOT report them as forgotten exports.\n } else {\n collector.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.ForgottenExport,\n `The symbol \"${localName}\" needs to be exported by the entry point ${entryPointFilename}`,\n astDeclaration\n );\n }\n }\n }\n }\n }\n\n // Detect an AstSymbol that refers to an ECMAScript symbol declaration such as:\n //\n // const mySymbol: unique symbol = Symbol('mySymbol');\n private static _isEcmaScriptSymbol(astSymbol: AstSymbol): boolean {\n if (astSymbol.astDeclarations.length !== 1) {\n return false;\n }\n\n // We are matching a form like this:\n //\n // - VariableDeclaration:\n // - Identifier: pre=[mySymbol]\n // - ColonToken: pre=[:] sep=[ ]\n // - TypeOperator:\n // - UniqueKeyword: pre=[unique] sep=[ ]\n // - SymbolKeyword: pre=[symbol]\n const astDeclaration: AstDeclaration = astSymbol.astDeclarations[0];\n if (ts.isVariableDeclaration(astDeclaration.declaration)) {\n const variableTypeNode: ts.TypeNode | undefined = astDeclaration.declaration.type;\n if (variableTypeNode) {\n for (const token of variableTypeNode.getChildren()) {\n if (token.kind === ts.SyntaxKind.SymbolKeyword) {\n return true;\n }\n }\n }\n }\n\n return false;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ValidationEnhancer.js","sourceRoot":"","sources":["../../src/enhancers/ValidationEnhancer.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,gDAAkC;AAElC,+CAAiC;AAEjC,wEAA4D;AAG5D,qDAAkD;AAKlD,kEAA+D;AAC/D,uEAAoE;AAIpE,MAAa,kBAAkB;IACtB,MAAM,CAAC,OAAO,CAAC,SAAoB;QACxC,MAAM,qBAAqB,GAAmB,IAAI,GAAG,EAAa,CAAC;QAEnE,KAAK,MAAM,MAAM,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;YACxC,IACE,CAAC,CACC,MAAM,CAAC,UAAU;gBACjB,SAAS,CAAC,eAAe,CAAC,gCAAgC;gBAC1D,SAAS,CAAC,eAAe,CAAC,+BAA+B,CAC1D,EACD,CAAC;gBACD,SAAS;YACX,CAAC;YAED,IAAI,MAAM,CAAC,SAAS,YAAY,qBAAS,EAAE,CAAC;gBAC1C,+BAA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E;IACF,sDAAsD;IAC9C,MAAM,CAAC,mBAAmB,CAAC,SAAoB;QACrD,IAAI,SAAS,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3C,OAAO,KAAK,CAAC;QACf,CAAC;QAED,oCAAoC;QACpC,EAAE;QACF,yBAAyB;QACzB,kCAAkC;QAClC,mCAAmC;QACnC,oBAAoB;QACpB,6CAA6C;QAC7C,qCAAqC;QACrC,MAAM,cAAc,GAAmB,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QACpE,IAAI,EAAE,CAAC,qBAAqB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,CAAC;YACzD,MAAM,gBAAgB,GAA4B,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC;YAClF,IAAI,gBAAgB,EAAE,CAAC;gBACrB,KAAK,MAAM,KAAK,IAAI,gBAAgB,CAAC,WAAW,EAAE,EAAE,CAAC;oBACnD,IAAI,KAAK,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC;wBAC/C,OAAO,IAAI,CAAC;oBACd,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA3RD,gDA2RC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as path from 'node:path';\n\nimport * as ts from 'typescript';\n\nimport { ReleaseTag } from '@microsoft/api-extractor-model';\n\nimport type { Collector } from '../collector/Collector';\nimport { AstSymbol } from '../analyzer/AstSymbol';\nimport type { AstDeclaration } from '../analyzer/AstDeclaration';\nimport type { ApiItemMetadata } from '../collector/ApiItemMetadata';\nimport type { SymbolMetadata } from '../collector/SymbolMetadata';\nimport type { CollectorEntity } from '../collector/CollectorEntity';\nimport { ExtractorMessageId } from '../api/ExtractorMessageId';\nimport { AstNamespaceImport } from '../analyzer/AstNamespaceImport';\nimport type { IAstModuleExportInfo } from '../analyzer/AstModule';\nimport type { AstEntity } from '../analyzer/AstEntity';\n\nexport class ValidationEnhancer {\n public static analyze(collector: Collector): void {\n const alreadyWarnedEntities: Set<AstEntity> = new Set<AstEntity>();\n\n for (const entity of collector.entities) {\n if (\n !(\n entity.consumable ||\n collector.extractorConfig.apiReportIncludeForgottenExports ||\n collector.extractorConfig.docModelIncludeForgottenExports\n )\n ) {\n continue;\n }\n\n if (entity.astEntity instanceof AstSymbol) {\n // A regular exported AstSymbol\n\n const astSymbol: AstSymbol = entity.astEntity;\n\n astSymbol.forEachDeclarationRecursive((astDeclaration: AstDeclaration) => {\n ValidationEnhancer._checkReferences(collector, astDeclaration, alreadyWarnedEntities);\n });\n\n const symbolMetadata: SymbolMetadata = collector.fetchSymbolMetadata(astSymbol);\n ValidationEnhancer._checkForInternalUnderscore(collector, entity, astSymbol, symbolMetadata);\n ValidationEnhancer._checkForInconsistentReleaseTags(collector, astSymbol, symbolMetadata);\n } else if (entity.astEntity instanceof AstNamespaceImport) {\n // A namespace created using \"import * as ___ from ___\"\n const astNamespaceImport: AstNamespaceImport = entity.astEntity;\n\n const astModuleExportInfo: IAstModuleExportInfo =\n astNamespaceImport.fetchAstModuleExportInfo(collector);\n\n for (const namespaceMemberAstEntity of astModuleExportInfo.exportedLocalEntities.values()) {\n if (namespaceMemberAstEntity instanceof AstSymbol) {\n const astSymbol: AstSymbol = namespaceMemberAstEntity;\n\n astSymbol.forEachDeclarationRecursive((astDeclaration: AstDeclaration) => {\n ValidationEnhancer._checkReferences(collector, astDeclaration, alreadyWarnedEntities);\n });\n\n const symbolMetadata: SymbolMetadata = collector.fetchSymbolMetadata(astSymbol);\n\n // (Don't apply ValidationEnhancer._checkForInternalUnderscore() for AstNamespaceImport members)\n\n ValidationEnhancer._checkForInconsistentReleaseTags(collector, astSymbol, symbolMetadata);\n }\n }\n }\n }\n }\n\n private static _checkForInternalUnderscore(\n collector: Collector,\n collectorEntity: CollectorEntity,\n astSymbol: AstSymbol,\n symbolMetadata: SymbolMetadata\n ): void {\n let needsUnderscore: boolean = false;\n\n if (symbolMetadata.maxEffectiveReleaseTag === ReleaseTag.Internal) {\n if (!astSymbol.parentAstSymbol) {\n // If it's marked as @internal and has no parent, then it needs an underscore.\n // We use maxEffectiveReleaseTag because a merged declaration would NOT need an underscore in a case like this:\n //\n // /** @public */\n // export enum X { }\n //\n // /** @internal */\n // export namespace X { }\n //\n // (The above normally reports an error \"ae-different-release-tags\", but that may be suppressed.)\n needsUnderscore = true;\n } else {\n // If it's marked as @internal and the parent isn't obviously already @internal, then it needs an underscore.\n //\n // For example, we WOULD need an underscore for a merged declaration like this:\n //\n // /** @internal */\n // export namespace X {\n // export interface _Y { }\n // }\n //\n // /** @public */\n // export class X {\n // /** @internal */\n // public static _Y(): void { } // <==== different from parent\n // }\n const parentSymbolMetadata: SymbolMetadata = collector.fetchSymbolMetadata(astSymbol);\n if (parentSymbolMetadata.maxEffectiveReleaseTag > ReleaseTag.Internal) {\n needsUnderscore = true;\n }\n }\n }\n\n if (needsUnderscore) {\n for (const exportName of collectorEntity.exportNames) {\n if (exportName[0] !== '_') {\n collector.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.InternalMissingUnderscore,\n `The name \"${exportName}\" should be prefixed with an underscore` +\n ` because the declaration is marked as @internal`,\n astSymbol,\n { exportName }\n );\n }\n }\n }\n }\n\n private static _checkForInconsistentReleaseTags(\n collector: Collector,\n astSymbol: AstSymbol,\n symbolMetadata: SymbolMetadata\n ): void {\n if (astSymbol.isExternal) {\n // For now, don't report errors for external code. If the developer cares about it, they should run\n // API Extractor separately on the external project\n return;\n }\n\n // Normally we will expect all release tags to be the same. Arbitrarily we choose the maxEffectiveReleaseTag\n // as the thing they should all match.\n const expectedEffectiveReleaseTag: ReleaseTag = symbolMetadata.maxEffectiveReleaseTag;\n\n // This is set to true if we find a declaration whose release tag is different from expectedEffectiveReleaseTag\n let mixedReleaseTags: boolean = false;\n\n // This is set to false if we find a declaration that is not a function/method overload\n let onlyFunctionOverloads: boolean = true;\n\n // This is set to true if we find a declaration that is @internal\n let anyInternalReleaseTags: boolean = false;\n\n for (const astDeclaration of astSymbol.astDeclarations) {\n const apiItemMetadata: ApiItemMetadata = collector.fetchApiItemMetadata(astDeclaration);\n const effectiveReleaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n\n switch (astDeclaration.declaration.kind) {\n case ts.SyntaxKind.FunctionDeclaration:\n case ts.SyntaxKind.MethodDeclaration:\n break;\n default:\n onlyFunctionOverloads = false;\n }\n\n if (effectiveReleaseTag !== expectedEffectiveReleaseTag) {\n mixedReleaseTags = true;\n }\n\n if (effectiveReleaseTag === ReleaseTag.Internal) {\n anyInternalReleaseTags = true;\n }\n }\n\n if (mixedReleaseTags) {\n if (!onlyFunctionOverloads) {\n collector.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.DifferentReleaseTags,\n 'This symbol has another declaration with a different release tag',\n astSymbol\n );\n }\n\n if (anyInternalReleaseTags) {\n collector.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.InternalMixedReleaseTag,\n `Mixed release tags are not allowed for \"${astSymbol.localName}\" because one of its declarations` +\n ` is marked as @internal`,\n astSymbol\n );\n }\n }\n }\n\n private static _checkReferences(\n collector: Collector,\n astDeclaration: AstDeclaration,\n alreadyWarnedEntities: Set<AstEntity>\n ): void {\n const apiItemMetadata: ApiItemMetadata = collector.fetchApiItemMetadata(astDeclaration);\n const declarationReleaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n\n for (const referencedEntity of astDeclaration.referencedAstEntities) {\n let collectorEntity: CollectorEntity | undefined;\n let referencedReleaseTag: ReleaseTag;\n let localName: string;\n\n if (referencedEntity instanceof AstSymbol) {\n // If this is e.g. a member of a namespace, then we need to be checking the top-level scope to see\n // whether it's exported.\n //\n // TODO: Technically we should also check each of the nested scopes along the way.\n const rootSymbol: AstSymbol = referencedEntity.rootAstSymbol;\n\n if (rootSymbol.isExternal) {\n continue;\n }\n\n collectorEntity = collector.tryGetCollectorEntity(rootSymbol);\n localName = collectorEntity?.nameForEmit || rootSymbol.localName;\n\n const referencedMetadata: SymbolMetadata = collector.fetchSymbolMetadata(referencedEntity);\n referencedReleaseTag = referencedMetadata.maxEffectiveReleaseTag;\n } else if (referencedEntity instanceof AstNamespaceImport) {\n collectorEntity = collector.tryGetCollectorEntity(referencedEntity);\n\n // TODO: Currently the \"import * as ___ from ___\" syntax does not yet support doc comments\n referencedReleaseTag = ReleaseTag.Public;\n\n localName = collectorEntity?.nameForEmit || referencedEntity.localName;\n } else {\n continue;\n }\n\n if (collectorEntity && collectorEntity.consumable) {\n if (ReleaseTag.compare(declarationReleaseTag, referencedReleaseTag) > 0) {\n collector.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.IncompatibleReleaseTags,\n `The symbol \"${astDeclaration.astSymbol.localName}\"` +\n ` is marked as ${ReleaseTag.getTagName(declarationReleaseTag)},` +\n ` but its signature references \"${localName}\"` +\n ` which is marked as ${ReleaseTag.getTagName(referencedReleaseTag)}`,\n astDeclaration\n );\n }\n } else {\n const entryPointFilename: string = path.basename(\n collector.workingPackage.entryPointSourceFile.fileName\n );\n\n if (!alreadyWarnedEntities.has(referencedEntity)) {\n alreadyWarnedEntities.add(referencedEntity);\n\n if (\n referencedEntity instanceof AstSymbol &&\n ValidationEnhancer._isEcmaScriptSymbol(referencedEntity)\n ) {\n // The main usage scenario for ECMAScript symbols is to attach private data to a JavaScript object,\n // so as a special case, we do NOT report them as forgotten exports.\n } else {\n collector.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.ForgottenExport,\n `The symbol \"${localName}\" needs to be exported by the entry point ${entryPointFilename}`,\n astDeclaration\n );\n }\n }\n }\n }\n }\n\n // Detect an AstSymbol that refers to an ECMAScript symbol declaration such as:\n //\n // const mySymbol: unique symbol = Symbol('mySymbol');\n private static _isEcmaScriptSymbol(astSymbol: AstSymbol): boolean {\n if (astSymbol.astDeclarations.length !== 1) {\n return false;\n }\n\n // We are matching a form like this:\n //\n // - VariableDeclaration:\n // - Identifier: pre=[mySymbol]\n // - ColonToken: pre=[:] sep=[ ]\n // - TypeOperator:\n // - UniqueKeyword: pre=[unique] sep=[ ]\n // - SymbolKeyword: pre=[symbol]\n const astDeclaration: AstDeclaration = astSymbol.astDeclarations[0];\n if (ts.isVariableDeclaration(astDeclaration.declaration)) {\n const variableTypeNode: ts.TypeNode | undefined = astDeclaration.declaration.type;\n if (variableTypeNode) {\n for (const token of variableTypeNode.getChildren()) {\n if (token.kind === ts.SyntaxKind.SymbolKeyword) {\n return true;\n }\n }\n }\n }\n\n return false;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiModelGenerator.d.ts","sourceRoot":"","sources":["../../src/generators/ApiModelGenerator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiModelGenerator.d.ts","sourceRoot":"","sources":["../../src/generators/ApiModelGenerator.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,QAAQ,EAER,UAAU,EAOV,UAAU,EAiBX,MAAM,gCAAgC,CAAC;AAGxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAYxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAQ9D;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,iBAAiB,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;CACpC;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAY;IACvC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAW;IACrC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAgC;IACpE,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA8B;IAEjE,SAAgB,eAAe,EAAE,OAAO,CAAC;gBAEtB,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe;IAezE,IAAW,QAAQ,IAAI,QAAQ,CAE9B;IAEM,eAAe,IAAI,UAAU;IA8BpC,OAAO,CAAC,iBAAiB;IAiCzB,OAAO,CAAC,0BAA0B;IAoClC,OAAO,CAAC,mBAAmB;IAgG3B,OAAO,CAAC,2BAA2B;IAOnC,OAAO,CAAC,yBAAyB;IASjC,OAAO,CAAC,wBAAwB;IAiDhC,OAAO,CAAC,sBAAsB;IAyC9B,OAAO,CAAC,gBAAgB;IAgExB,OAAO,CAAC,6BAA6B;IAoDrC,OAAO,CAAC,eAAe;IAiCvB,OAAO,CAAC,qBAAqB;IAsC7B,OAAO,CAAC,mBAAmB;IAsD3B,OAAO,CAAC,yBAAyB;IA6CjC,OAAO,CAAC,oBAAoB;IAyD5B,OAAO,CAAC,iBAAiB;IA2DzB,OAAO,CAAC,0BAA0B;IAuDlC,OAAO,CAAC,oBAAoB;IAgC5B,OAAO,CAAC,mBAAmB;IA+D3B,OAAO,CAAC,4BAA4B;IA8CpC,OAAO,CAAC,oBAAoB;IA4C5B,OAAO,CAAC,mBAAmB;IA6C3B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAyB3B,OAAO,CAAC,sBAAsB;IAuB9B,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,WAAW;IA+BnB,OAAO,CAAC,eAAe;CAcxB"}
|
|
@@ -37,7 +37,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
exports.ApiModelGenerator = void 0;
|
|
39
39
|
/* eslint-disable no-bitwise */
|
|
40
|
-
const path = __importStar(require("path"));
|
|
40
|
+
const path = __importStar(require("node:path"));
|
|
41
41
|
const ts = __importStar(require("typescript"));
|
|
42
42
|
const api_extractor_model_1 = require("@microsoft/api-extractor-model");
|
|
43
43
|
const node_core_library_1 = require("@rushstack/node-core-library");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiModelGenerator.js","sourceRoot":"","sources":["../../src/generators/ApiModelGenerator.ts"],"names":[],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ChB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,+BAA+B;AAE/B,gDAAkC;AAElC,+CAAiC;AAGjC,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,kBAAkB,GAAG,yBAAyB,CAAC,iBAAiB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;gBAE7D,OAAO,mBAAmB,IAAI,iBAAiB,IAAI,oBAAoB,IAAI,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 'node:path';\n\nimport * as ts from 'typescript';\n\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReportGenerator.d.ts","sourceRoot":"","sources":["../../src/generators/ApiReportGenerator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReportGenerator.d.ts","sourceRoot":"","sources":["../../src/generators/ApiReportGenerator.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAgBnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAmB;IAEnD;;;;;;OAMG;WACW,4BAA4B,CACxC,iBAAiB,EAAE,MAAM,EACzB,mBAAmB,EAAE,MAAM,GAC1B,OAAO;IAOV;;;;;OAKG;WACW,yBAAyB,CAAC,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,GAAG,MAAM;IA6NtG;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IA6L1B,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAgBxC,OAAO,CAAC,MAAM,CAAC,wBAAwB;IA8BvC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,yBAAyB;IA8CxC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAuFhC,OAAO,CAAC,MAAM,CAAC,oBAAoB;CAQpC"}
|
|
@@ -37,8 +37,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
exports.ApiReportGenerator = void 0;
|
|
39
39
|
const ts = __importStar(require("typescript"));
|
|
40
|
-
const node_core_library_1 = require("@rushstack/node-core-library");
|
|
41
40
|
const api_extractor_model_1 = require("@microsoft/api-extractor-model");
|
|
41
|
+
const node_core_library_1 = require("@rushstack/node-core-library");
|
|
42
42
|
const Collector_1 = require("../collector/Collector");
|
|
43
43
|
const TypeScriptHelpers_1 = require("../analyzer/TypeScriptHelpers");
|
|
44
44
|
const Span_1 = require("../analyzer/Span");
|