@microsoft/api-extractor 7.52.15 → 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.
Files changed (94) hide show
  1. package/CHANGELOG.json +29 -0
  2. package/CHANGELOG.md +8 -1
  3. package/dist/tsdoc-metadata.json +1 -1
  4. package/lib/aedoc/PackageDocComment.d.ts.map +1 -1
  5. package/lib/aedoc/PackageDocComment.js.map +1 -1
  6. package/lib/analyzer/AstDeclaration.d.ts.map +1 -1
  7. package/lib/analyzer/AstDeclaration.js +1 -1
  8. package/lib/analyzer/AstDeclaration.js.map +1 -1
  9. package/lib/analyzer/AstImport.d.ts.map +1 -1
  10. package/lib/analyzer/AstImport.js.map +1 -1
  11. package/lib/analyzer/AstReferenceResolver.d.ts.map +1 -1
  12. package/lib/analyzer/AstReferenceResolver.js.map +1 -1
  13. package/lib/analyzer/AstSymbol.d.ts.map +1 -1
  14. package/lib/analyzer/AstSymbol.js.map +1 -1
  15. package/lib/analyzer/AstSymbolTable.d.ts.map +1 -1
  16. package/lib/analyzer/AstSymbolTable.js.map +1 -1
  17. package/lib/analyzer/ExportAnalyzer.d.ts.map +1 -1
  18. package/lib/analyzer/ExportAnalyzer.js.map +1 -1
  19. package/lib/analyzer/PackageMetadataManager.d.ts.map +1 -1
  20. package/lib/analyzer/PackageMetadataManager.js +11 -11
  21. package/lib/analyzer/PackageMetadataManager.js.map +1 -1
  22. package/lib/analyzer/SourceFileLocationFormatter.d.ts.map +1 -1
  23. package/lib/analyzer/SourceFileLocationFormatter.js +1 -1
  24. package/lib/analyzer/SourceFileLocationFormatter.js.map +1 -1
  25. package/lib/analyzer/Span.d.ts.map +1 -1
  26. package/lib/analyzer/Span.js.map +1 -1
  27. package/lib/analyzer/TypeScriptHelpers.d.ts.map +1 -1
  28. package/lib/analyzer/TypeScriptHelpers.js +1 -1
  29. package/lib/analyzer/TypeScriptHelpers.js.map +1 -1
  30. package/lib/analyzer/TypeScriptInternals.d.ts.map +1 -1
  31. package/lib/analyzer/TypeScriptInternals.js.map +1 -1
  32. package/lib/api/CompilerState.d.ts.map +1 -1
  33. package/lib/api/CompilerState.js +2 -2
  34. package/lib/api/CompilerState.js.map +1 -1
  35. package/lib/api/Extractor.d.ts.map +1 -1
  36. package/lib/api/Extractor.js +2 -2
  37. package/lib/api/Extractor.js.map +1 -1
  38. package/lib/api/ExtractorConfig.d.ts +2 -2
  39. package/lib/api/ExtractorConfig.d.ts.map +1 -1
  40. package/lib/api/ExtractorConfig.js +3 -3
  41. package/lib/api/ExtractorConfig.js.map +1 -1
  42. package/lib/api/ExtractorMessage.d.ts.map +1 -1
  43. package/lib/api/ExtractorMessage.js.map +1 -1
  44. package/lib/api/IConfigFile.d.ts.map +1 -1
  45. package/lib/api/IConfigFile.js.map +1 -1
  46. package/lib/cli/ApiExtractorCommandLine.js +1 -1
  47. package/lib/cli/ApiExtractorCommandLine.js.map +1 -1
  48. package/lib/cli/InitAction.d.ts.map +1 -1
  49. package/lib/cli/InitAction.js +1 -1
  50. package/lib/cli/InitAction.js.map +1 -1
  51. package/lib/cli/RunAction.d.ts.map +1 -1
  52. package/lib/cli/RunAction.js +2 -2
  53. package/lib/cli/RunAction.js.map +1 -1
  54. package/lib/collector/ApiItemMetadata.d.ts.map +1 -1
  55. package/lib/collector/ApiItemMetadata.js.map +1 -1
  56. package/lib/collector/Collector.d.ts.map +1 -1
  57. package/lib/collector/Collector.js +2 -2
  58. package/lib/collector/Collector.js.map +1 -1
  59. package/lib/collector/CollectorEntity.d.ts.map +1 -1
  60. package/lib/collector/CollectorEntity.js +1 -1
  61. package/lib/collector/CollectorEntity.js.map +1 -1
  62. package/lib/collector/DeclarationMetadata.d.ts.map +1 -1
  63. package/lib/collector/DeclarationMetadata.js.map +1 -1
  64. package/lib/collector/MessageRouter.d.ts.map +1 -1
  65. package/lib/collector/MessageRouter.js.map +1 -1
  66. package/lib/collector/SourceMapper.d.ts.map +1 -1
  67. package/lib/collector/SourceMapper.js +1 -1
  68. package/lib/collector/SourceMapper.js.map +1 -1
  69. package/lib/collector/WorkingPackage.d.ts.map +1 -1
  70. package/lib/collector/WorkingPackage.js.map +1 -1
  71. package/lib/enhancers/DocCommentEnhancer.d.ts.map +1 -1
  72. package/lib/enhancers/DocCommentEnhancer.js +1 -1
  73. package/lib/enhancers/DocCommentEnhancer.js.map +1 -1
  74. package/lib/enhancers/ValidationEnhancer.d.ts.map +1 -1
  75. package/lib/enhancers/ValidationEnhancer.js +2 -2
  76. package/lib/enhancers/ValidationEnhancer.js.map +1 -1
  77. package/lib/generators/ApiModelGenerator.d.ts.map +1 -1
  78. package/lib/generators/ApiModelGenerator.js +1 -1
  79. package/lib/generators/ApiModelGenerator.js.map +1 -1
  80. package/lib/generators/ApiReportGenerator.d.ts.map +1 -1
  81. package/lib/generators/ApiReportGenerator.js +1 -1
  82. package/lib/generators/ApiReportGenerator.js.map +1 -1
  83. package/lib/generators/DeclarationReferenceGenerator.d.ts.map +1 -1
  84. package/lib/generators/DeclarationReferenceGenerator.js.map +1 -1
  85. package/lib/generators/DtsEmitHelpers.d.ts.map +1 -1
  86. package/lib/generators/DtsEmitHelpers.js.map +1 -1
  87. package/lib/generators/DtsRollupGenerator.d.ts.map +1 -1
  88. package/lib/generators/DtsRollupGenerator.js +1 -1
  89. package/lib/generators/DtsRollupGenerator.js.map +1 -1
  90. package/lib/generators/ExcerptBuilder.d.ts.map +1 -1
  91. package/lib/generators/ExcerptBuilder.js.map +1 -1
  92. package/lib/start.js +1 -1
  93. package/lib/start.js.map +1 -1
  94. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"ApiExtractorCommandLine.js","sourceRoot":"","sources":["../../src/cli/ApiExtractorCommandLine.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,uCAAyB;AAEzB,gEAA8F;AAC9F,oEAAmF;AACnF,kDAA+C;AAE/C,2CAAw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,CAAC,CAAC,CAAC;QACrC,IAAI,CAAC,SAAS,CAAC,IAAI,qBAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,CAAC;CACF;AA9CD,0DA8CC","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 os from 'os';\n\nimport { CommandLineParser, type CommandLineFlagParameter } from '@rushstack/ts-command-line';\nimport { AlreadyReportedError, InternalError } from '@rushstack/node-core-library';\nimport { Colorize } from '@rushstack/terminal';\n\nimport { RunAction } from './RunAction';\nimport { InitAction } from './InitAction';\n\nexport class ApiExtractorCommandLine extends CommandLineParser {\n private readonly _debugParameter: CommandLineFlagParameter;\n\n public constructor() {\n super({\n toolFilename: 'api-extractor',\n toolDescription:\n 'API Extractor helps you build better TypeScript libraries. It analyzes the main entry' +\n ' point for your package, collects the inventory of exported declarations, and then generates three kinds' +\n ' of output: an API report file (.api.md) to facilitate reviews, a declaration rollup (.d.ts) to be' +\n ' published with your NPM package, and a doc model file (.api.json) to be used with a documentation' +\n ' tool such as api-documenter. For details, please visit the web site.'\n });\n this._populateActions();\n\n this._debugParameter = this.defineFlagParameter({\n parameterLongName: '--debug',\n parameterShortName: '-d',\n description: 'Show the full call stack if an error occurs while executing the tool'\n });\n }\n\n protected override async onExecuteAsync(): Promise<void> {\n if (this._debugParameter.value) {\n InternalError.breakInDebugger = true;\n }\n\n process.exitCode = 1;\n try {\n await super.onExecuteAsync();\n process.exitCode = 0;\n } catch (error) {\n if (!(error instanceof AlreadyReportedError)) {\n if (this._debugParameter.value) {\n console.error(os.EOL + error.stack);\n } else {\n console.error(os.EOL + Colorize.red('ERROR: ' + error.message.trim()));\n }\n }\n }\n }\n\n private _populateActions(): void {\n this.addAction(new InitAction(this));\n this.addAction(new RunAction(this));\n }\n}\n"]}
1
+ {"version":3,"file":"ApiExtractorCommandLine.js","sourceRoot":"","sources":["../../src/cli/ApiExtractorCommandLine.ts"],"names":[],"mappings":";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C,IAAI,EAAE,CAAC,CAAC,CAAC;gBACzE,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAEO,gBAAgB;QACtB,IAAI,CAAC,SAAS,CAAC,IAAI,uBAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QACrC,IAAI,CAAC,SAAS,CAAC,IAAI,qBAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,CAAC;CACF;AA9CD,0DA8CC","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 os from 'node:os';\n\nimport { CommandLineParser, type CommandLineFlagParameter } from '@rushstack/ts-command-line';\nimport { AlreadyReportedError, InternalError } from '@rushstack/node-core-library';\nimport { Colorize } from '@rushstack/terminal';\n\nimport { RunAction } from './RunAction';\nimport { InitAction } from './InitAction';\n\nexport class ApiExtractorCommandLine extends CommandLineParser {\n private readonly _debugParameter: CommandLineFlagParameter;\n\n public constructor() {\n super({\n toolFilename: 'api-extractor',\n toolDescription:\n 'API Extractor helps you build better TypeScript libraries. It analyzes the main entry' +\n ' point for your package, collects the inventory of exported declarations, and then generates three kinds' +\n ' of output: an API report file (.api.md) to facilitate reviews, a declaration rollup (.d.ts) to be' +\n ' published with your NPM package, and a doc model file (.api.json) to be used with a documentation' +\n ' tool such as api-documenter. For details, please visit the web site.'\n });\n this._populateActions();\n\n this._debugParameter = this.defineFlagParameter({\n parameterLongName: '--debug',\n parameterShortName: '-d',\n description: 'Show the full call stack if an error occurs while executing the tool'\n });\n }\n\n protected override async onExecuteAsync(): Promise<void> {\n if (this._debugParameter.value) {\n InternalError.breakInDebugger = true;\n }\n\n process.exitCode = 1;\n try {\n await super.onExecuteAsync();\n process.exitCode = 0;\n } catch (error) {\n if (!(error instanceof AlreadyReportedError)) {\n if (this._debugParameter.value) {\n console.error(os.EOL + error.stack);\n } else {\n console.error(os.EOL + Colorize.red('ERROR: ' + error.message.trim()));\n }\n }\n }\n }\n\n private _populateActions(): void {\n this.addAction(new InitAction(this));\n this.addAction(new RunAction(this));\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"InitAction.d.ts","sourceRoot":"","sources":["../../src/cli/InitAction.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGzE,qBAAa,UAAW,SAAQ,iBAAiB;gBAC5B,MAAM,EAAE,uBAAuB;cAWzB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;CAqBzD"}
1
+ {"version":3,"file":"InitAction.d.ts","sourceRoot":"","sources":["../../src/cli/InitAction.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGzE,qBAAa,UAAW,SAAQ,iBAAiB;gBAC5B,MAAM,EAAE,uBAAuB;cAWzB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;CAqBzD"}
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  })();
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
38
  exports.InitAction = void 0;
39
- const path = __importStar(require("path"));
39
+ const path = __importStar(require("node:path"));
40
40
  const node_core_library_1 = require("@rushstack/node-core-library");
41
41
  const ts_command_line_1 = require("@rushstack/ts-command-line");
42
42
  const terminal_1 = require("@rushstack/terminal");
@@ -1 +1 @@
1
- {"version":3,"file":"InitAction.js","sourceRoot":"","sources":["../../src/cli/InitAction.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,2CAA6B;AAC7B,oEAA0D;AAC1D,gEAA+D;AAC/D,kDAA+C;AAG/C,4DAAyD;AAEzD,MAAa,UAAW,SAAQ,mCAAiB;IAC/C,YAAmB,MAA+B;QAChD,KAAK,CAAC;YACJ,UAAU,EAAE,MAAM;YAClB,OAAO,EAAE,aAAa,iCAAe,CAAC,QAAQ,cAAc;YAC5D,aAAa,EACX,iFAAiF;gBACjF,IAAI,iCAAe,CAAC,QAAQ,0EAA0E;gBACtG,qDAAqD;SACxD,CAAC,CAAC;IACL,CAAC;IAEkB,KAAK,CAAC,cAAc;QACrC,MAAM,aAAa,GAAW,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,wCAAwC,CAAC,CAAC;QAChG,MAAM,cAAc,GAAW,IAAI,CAAC,OAAO,CAAC,iCAAe,CAAC,QAAQ,CAAC,CAAC;QAEtE,IAAI,8BAAU,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,mBAAQ,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC;YAC7D,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,cAAc,GAAG,IAAI,CAAC,CAAC;YAC5C,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACjD,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,mBAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,cAAc,CAAC,CAAC;QAC/D,8BAAU,CAAC,QAAQ,CAAC;YAClB,UAAU,EAAE,aAAa;YACzB,eAAe,EAAE,cAAc;SAChC,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CACT,qFAAqF;YACnF,oDAAoD,CACvD,CAAC;IACJ,CAAC;CACF;AAjCD,gCAiCC","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 { FileSystem } from '@rushstack/node-core-library';\nimport { CommandLineAction } from '@rushstack/ts-command-line';\nimport { Colorize } from '@rushstack/terminal';\n\nimport type { ApiExtractorCommandLine } from './ApiExtractorCommandLine';\nimport { ExtractorConfig } from '../api/ExtractorConfig';\n\nexport class InitAction extends CommandLineAction {\n public constructor(parser: ApiExtractorCommandLine) {\n super({\n actionName: 'init',\n summary: `Create an ${ExtractorConfig.FILENAME} config file`,\n documentation:\n `Use this command when setting up API Extractor for a new project. It writes an` +\n ` ${ExtractorConfig.FILENAME} config file template with code comments that describe all the settings.` +\n ` The file will be written in the current directory.`\n });\n }\n\n protected override async onExecuteAsync(): Promise<void> {\n const inputFilePath: string = path.resolve(__dirname, '../schemas/api-extractor-template.json');\n const outputFilePath: string = path.resolve(ExtractorConfig.FILENAME);\n\n if (FileSystem.exists(outputFilePath)) {\n console.log(Colorize.red('The output file already exists:'));\n console.log('\\n ' + outputFilePath + '\\n');\n throw new Error('Unable to write output file');\n }\n\n console.log(Colorize.green('Writing file: ') + outputFilePath);\n FileSystem.copyFile({\n sourcePath: inputFilePath,\n destinationPath: outputFilePath\n });\n\n console.log(\n '\\nThe recommended location for this file is in the project\\'s \"config\" subfolder,\\n' +\n 'or else in the top-level folder with package.json.'\n );\n }\n}\n"]}
1
+ {"version":3,"file":"InitAction.js","sourceRoot":"","sources":["../../src/cli/InitAction.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,gDAAkC;AAElC,oEAA0D;AAC1D,gEAA+D;AAC/D,kDAA+C;AAG/C,4DAAyD;AAEzD,MAAa,UAAW,SAAQ,mCAAiB;IAC/C,YAAmB,MAA+B;QAChD,KAAK,CAAC;YACJ,UAAU,EAAE,MAAM;YAClB,OAAO,EAAE,aAAa,iCAAe,CAAC,QAAQ,cAAc;YAC5D,aAAa,EACX,iFAAiF;gBACjF,IAAI,iCAAe,CAAC,QAAQ,0EAA0E;gBACtG,qDAAqD;SACxD,CAAC,CAAC;IACL,CAAC;IAEkB,KAAK,CAAC,cAAc;QACrC,MAAM,aAAa,GAAW,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,wCAAwC,CAAC,CAAC;QAChG,MAAM,cAAc,GAAW,IAAI,CAAC,OAAO,CAAC,iCAAe,CAAC,QAAQ,CAAC,CAAC;QAEtE,IAAI,8BAAU,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,mBAAQ,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC;YAC7D,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,cAAc,GAAG,IAAI,CAAC,CAAC;YAC5C,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACjD,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,mBAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,cAAc,CAAC,CAAC;QAC/D,8BAAU,CAAC,QAAQ,CAAC;YAClB,UAAU,EAAE,aAAa;YACzB,eAAe,EAAE,cAAc;SAChC,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CACT,qFAAqF;YACnF,oDAAoD,CACvD,CAAC;IACJ,CAAC;CACF;AAjCD,gCAiCC","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 { FileSystem } from '@rushstack/node-core-library';\nimport { CommandLineAction } from '@rushstack/ts-command-line';\nimport { Colorize } from '@rushstack/terminal';\n\nimport type { ApiExtractorCommandLine } from './ApiExtractorCommandLine';\nimport { ExtractorConfig } from '../api/ExtractorConfig';\n\nexport class InitAction extends CommandLineAction {\n public constructor(parser: ApiExtractorCommandLine) {\n super({\n actionName: 'init',\n summary: `Create an ${ExtractorConfig.FILENAME} config file`,\n documentation:\n `Use this command when setting up API Extractor for a new project. It writes an` +\n ` ${ExtractorConfig.FILENAME} config file template with code comments that describe all the settings.` +\n ` The file will be written in the current directory.`\n });\n }\n\n protected override async onExecuteAsync(): Promise<void> {\n const inputFilePath: string = path.resolve(__dirname, '../schemas/api-extractor-template.json');\n const outputFilePath: string = path.resolve(ExtractorConfig.FILENAME);\n\n if (FileSystem.exists(outputFilePath)) {\n console.log(Colorize.red('The output file already exists:'));\n console.log('\\n ' + outputFilePath + '\\n');\n throw new Error('Unable to write output file');\n }\n\n console.log(Colorize.green('Writing file: ') + outputFilePath);\n FileSystem.copyFile({\n sourcePath: inputFilePath,\n destinationPath: outputFilePath\n });\n\n console.log(\n '\\nThe recommended location for this file is in the project\\'s \"config\" subfolder,\\n' +\n 'or else in the top-level folder with package.json.'\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RunAction.d.ts","sourceRoot":"","sources":["../../src/cli/RunAction.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,iBAAiB,EAGlB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGzE,qBAAa,SAAU,SAAQ,iBAAiB;IAC9C,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAA6B;IAClE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA2B;IAC3D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA2B;IAC7D,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAA2B;IACjE,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAA6B;gBAEpD,MAAM,EAAE,uBAAuB;cAiDzB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;CA2EzD"}
1
+ {"version":3,"file":"RunAction.d.ts","sourceRoot":"","sources":["../../src/cli/RunAction.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,iBAAiB,EAGlB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGzE,qBAAa,SAAU,SAAQ,iBAAiB;IAC9C,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAA6B;IAClE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA2B;IAC3D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA2B;IAC7D,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAA2B;IACjE,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAA6B;gBAEpD,MAAM,EAAE,uBAAuB;cAiDzB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;CA2EzD"}
@@ -36,8 +36,8 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  })();
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
38
  exports.RunAction = void 0;
39
- const os = __importStar(require("os"));
40
- const path = __importStar(require("path"));
39
+ const os = __importStar(require("node:os"));
40
+ const path = __importStar(require("node:path"));
41
41
  const node_core_library_1 = require("@rushstack/node-core-library");
42
42
  const terminal_1 = require("@rushstack/terminal");
43
43
  const ts_command_line_1 = require("@rushstack/ts-command-line");
@@ -1 +1 @@
1
- {"version":3,"file":"RunAction.js","sourceRoot":"","sources":["../../src/cli/RunAction.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,uCAAyB;AACzB,2CAA6B;AAC7B,oEAMsC;AACtC,kDAA+C;AAC/C,gEAIoC;AAEpC,gDAAmE;AAEnE,4DAA8F;AAE9F,MAAa,SAAU,SAAQ,mCAAiB;IAO9C,YAAmB,MAA+B;QAChD,KAAK,CAAC;YACJ,UAAU,EAAE,KAAK;YACjB,OAAO,EAAE,mCAAmC;YAC5C,aAAa,EAAE,mCAAmC;SACnD,CAAC,CAAC;QAEH,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,qBAAqB,CAAC;YACrD,iBAAiB,EAAE,UAAU;YAC7B,kBAAkB,EAAE,IAAI;YACxB,YAAY,EAAE,MAAM;YACpB,WAAW,EAAE,qBAAqB,iCAAe,CAAC,QAAQ,+CAA+C;SAC1G,CAAC,CAAC;QAEH,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,mBAAmB,CAAC;YAC9C,iBAAiB,EAAE,SAAS;YAC5B,kBAAkB,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AC;YACH,OAAO,CAAC,GAAG,CAAC,4BAA4B,qBAAqB,EAAE,CAAC,CAAC;YAEjE,eAAe,GAAG,iCAAe,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAC5D,CAAC;QAED,MAAM,eAAe,GAAoB,qBAAS,CAAC,MAAM,CAAC,eAAe,EAAE;YACzE,UAAU,EAAE,IAAI,CAAC,eAAe,CAAC,KAAK;YACtC,mBAAmB,EAAE,IAAI,CAAC,iBAAiB,CAAC,KAAK;YACjD,eAAe,EAAE,IAAI,CAAC,qBAAqB,CAAC,KAAK;YACjD,wBAAwB,EAAE,wBAAwB;SACnD,CAAC,CAAC;QAEH,IAAI,eAAe,CAAC,SAAS,EAAE,CAAC;YAC9B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,sCAAsC,CAAC,CAAC;QAC/D,CAAC;aAAM,CAAC;YACN,IAAI,eAAe,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;gBACnC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,mBAAQ,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC,CAAC;YAC5E,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,mBAAQ,CAAC,MAAM,CAAC,uCAAuC,CAAC,CAAC,CAAC;YACjF,CAAC;YACD,MAAM,IAAI,wCAAoB,EAAE,CAAC;QACnC,CAAC;IACH,CAAC;CACF;AAnID,8BAmIC","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 os from 'os';\nimport * as path from 'path';\nimport {\n PackageJsonLookup,\n FileSystem,\n type IPackageJson,\n Path,\n AlreadyReportedError\n} from '@rushstack/node-core-library';\nimport { Colorize } from '@rushstack/terminal';\nimport {\n CommandLineAction,\n type CommandLineStringParameter,\n type CommandLineFlagParameter\n} from '@rushstack/ts-command-line';\n\nimport { Extractor, type ExtractorResult } from '../api/Extractor';\nimport type { ApiExtractorCommandLine } from './ApiExtractorCommandLine';\nimport { ExtractorConfig, type IExtractorConfigPrepareOptions } from '../api/ExtractorConfig';\n\nexport class RunAction extends CommandLineAction {\n private readonly _configFileParameter: CommandLineStringParameter;\n private readonly _localParameter: CommandLineFlagParameter;\n private readonly _verboseParameter: CommandLineFlagParameter;\n private readonly _diagnosticsParameter: CommandLineFlagParameter;\n private readonly _typescriptCompilerFolder: CommandLineStringParameter;\n\n public constructor(parser: ApiExtractorCommandLine) {\n super({\n actionName: 'run',\n summary: 'Invoke API Extractor on a project',\n documentation: 'Invoke API Extractor on a project'\n });\n\n this._configFileParameter = this.defineStringParameter({\n parameterLongName: '--config',\n parameterShortName: '-c',\n argumentName: 'FILE',\n description: `Use the specified ${ExtractorConfig.FILENAME} file path, rather than guessing its location`\n });\n\n this._localParameter = this.defineFlagParameter({\n parameterLongName: '--local',\n parameterShortName: '-l',\n description:\n 'Indicates that API Extractor is running as part of a local build,' +\n \" e.g. on a developer's machine. This disables certain validation that would\" +\n ' normally be performed for a ship/production build. For example, the *.api.md' +\n ' report file is automatically copied in a local build.'\n });\n\n this._verboseParameter = this.defineFlagParameter({\n parameterLongName: '--verbose',\n parameterShortName: '-v',\n description: 'Show additional informational messages in the output.'\n });\n\n this._diagnosticsParameter = this.defineFlagParameter({\n parameterLongName: '--diagnostics',\n description:\n 'Show diagnostic messages used for troubleshooting problems with API Extractor.' +\n ' This flag also enables the \"--verbose\" flag.'\n });\n\n this._typescriptCompilerFolder = this.defineStringParameter({\n parameterLongName: '--typescript-compiler-folder',\n argumentName: 'PATH',\n description:\n 'API Extractor uses its own TypeScript compiler engine to analyze your project. If your project' +\n ' is built with a significantly different TypeScript version, sometimes API Extractor may report compilation' +\n ' errors due to differences in the system typings (e.g. lib.dom.d.ts). You can use the' +\n ' \"--typescriptCompilerFolder\" option to specify the folder path where you installed the TypeScript package,' +\n \" and API Extractor's compiler will use those system typings instead.\"\n });\n }\n\n protected override async onExecuteAsync(): Promise<void> {\n const lookup: PackageJsonLookup = new PackageJsonLookup();\n let configFilename: string;\n\n let typescriptCompilerFolder: string | undefined = this._typescriptCompilerFolder.value;\n if (typescriptCompilerFolder) {\n typescriptCompilerFolder = path.normalize(typescriptCompilerFolder);\n\n if (FileSystem.exists(typescriptCompilerFolder)) {\n typescriptCompilerFolder = lookup.tryGetPackageFolderFor(typescriptCompilerFolder);\n const typescriptCompilerPackageJson: IPackageJson | undefined = typescriptCompilerFolder\n ? lookup.tryLoadPackageJsonFor(typescriptCompilerFolder)\n : undefined;\n if (!typescriptCompilerPackageJson) {\n throw new Error(\n `The path specified in the ${this._typescriptCompilerFolder.longName} parameter is not a package.`\n );\n } else if (typescriptCompilerPackageJson.name !== 'typescript') {\n throw new Error(\n `The path specified in the ${this._typescriptCompilerFolder.longName} parameter is not a TypeScript` +\n ' compiler package.'\n );\n }\n } else {\n throw new Error(\n `The path specified in the ${this._typescriptCompilerFolder.longName} parameter does not exist.`\n );\n }\n }\n\n let extractorConfig: ExtractorConfig;\n\n if (this._configFileParameter.value) {\n configFilename = path.normalize(this._configFileParameter.value);\n if (!FileSystem.exists(configFilename)) {\n throw new Error('Config file not found: ' + this._configFileParameter.value);\n }\n\n extractorConfig = ExtractorConfig.loadFileAndPrepare(configFilename);\n } else {\n const prepareOptions: IExtractorConfigPrepareOptions | undefined = ExtractorConfig.tryLoadForFolder({\n startingFolder: '.'\n });\n\n if (!prepareOptions || !prepareOptions.configObjectFullPath) {\n throw new Error(`Unable to find an ${ExtractorConfig.FILENAME} file`);\n }\n\n const configObjectShortPath: string = Path.formatConcisely({\n pathToConvert: prepareOptions.configObjectFullPath,\n baseFolder: process.cwd()\n });\n console.log(`Using configuration from ${configObjectShortPath}`);\n\n extractorConfig = ExtractorConfig.prepare(prepareOptions);\n }\n\n const extractorResult: ExtractorResult = Extractor.invoke(extractorConfig, {\n localBuild: this._localParameter.value,\n showVerboseMessages: this._verboseParameter.value,\n showDiagnostics: this._diagnosticsParameter.value,\n typescriptCompilerFolder: typescriptCompilerFolder\n });\n\n if (extractorResult.succeeded) {\n console.log(os.EOL + 'API Extractor completed successfully');\n } else {\n if (extractorResult.errorCount > 0) {\n console.log(os.EOL + Colorize.red('API Extractor completed with errors'));\n } else {\n console.log(os.EOL + Colorize.yellow('API Extractor completed with warnings'));\n }\n throw new AlreadyReportedError();\n }\n }\n}\n"]}
1
+ {"version":3,"file":"RunAction.js","sourceRoot":"","sources":["../../src/cli/RunAction.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,4CAA8B;AAC9B,gDAAkC;AAElC,oEAMsC;AACtC,kDAA+C;AAC/C,gEAIoC;AAEpC,gDAAmE;AAEnE,4DAA8F;AAE9F,MAAa,SAAU,SAAQ,mCAAiB;IAO9C,YAAmB,MAA+B;QAChD,KAAK,CAAC;YACJ,UAAU,EAAE,KAAK;YACjB,OAAO,EAAE,mCAAmC;YAC5C,aAAa,EAAE,mCAAmC;SACnD,CAAC,CAAC;QAEH,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,qBAAqB,CAAC;YACrD,iBAAiB,EAAE,UAAU;YAC7B,kBAAkB,EAAE,IAAI;YACxB,YAAY,EAAE,MAAM;YACpB,WAAW,EAAE,qBAAqB,iCAAe,CAAC,QAAQ,+CAA+C;SAC1G,CAAC,CAAC;QAEH,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,mBAAmB,CAAC;YAC9C,iBAAiB,EAAE,SAAS;YAC5B,kBAAkB,EAAE,IAAI;YACxB,WAAW,EACT,mEAAmE;gBACnE,6EAA6E;gBAC7E,+EAA+E;gBAC/E,wDAAwD;SAC3D,CAAC,CAAC;QAEH,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,mBAAmB,CAAC;YAChD,iBAAiB,EAAE,WAAW;YAC9B,kBAAkB,EAAE,IAAI;YACxB,WAAW,EAAE,uDA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CAAC,KAAK;YACtC,mBAAmB,EAAE,IAAI,CAAC,iBAAiB,CAAC,KAAK;YACjD,eAAe,EAAE,IAAI,CAAC,qBAAqB,CAAC,KAAK;YACjD,wBAAwB,EAAE,wBAAwB;SACnD,CAAC,CAAC;QAEH,IAAI,eAAe,CAAC,SAAS,EAAE,CAAC;YAC9B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,sCAAsC,CAAC,CAAC;QAC/D,CAAC;aAAM,CAAC;YACN,IAAI,eAAe,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;gBACnC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,mBAAQ,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC,CAAC;YAC5E,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,mBAAQ,CAAC,MAAM,CAAC,uCAAuC,CAAC,CAAC,CAAC;YACjF,CAAC;YACD,MAAM,IAAI,wCAAoB,EAAE,CAAC;QACnC,CAAC;IACH,CAAC;CACF;AAnID,8BAmIC","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 os from 'node:os';\nimport * as path from 'node:path';\n\nimport {\n PackageJsonLookup,\n FileSystem,\n type IPackageJson,\n Path,\n AlreadyReportedError\n} from '@rushstack/node-core-library';\nimport { Colorize } from '@rushstack/terminal';\nimport {\n CommandLineAction,\n type CommandLineStringParameter,\n type CommandLineFlagParameter\n} from '@rushstack/ts-command-line';\n\nimport { Extractor, type ExtractorResult } from '../api/Extractor';\nimport type { ApiExtractorCommandLine } from './ApiExtractorCommandLine';\nimport { ExtractorConfig, type IExtractorConfigPrepareOptions } from '../api/ExtractorConfig';\n\nexport class RunAction extends CommandLineAction {\n private readonly _configFileParameter: CommandLineStringParameter;\n private readonly _localParameter: CommandLineFlagParameter;\n private readonly _verboseParameter: CommandLineFlagParameter;\n private readonly _diagnosticsParameter: CommandLineFlagParameter;\n private readonly _typescriptCompilerFolder: CommandLineStringParameter;\n\n public constructor(parser: ApiExtractorCommandLine) {\n super({\n actionName: 'run',\n summary: 'Invoke API Extractor on a project',\n documentation: 'Invoke API Extractor on a project'\n });\n\n this._configFileParameter = this.defineStringParameter({\n parameterLongName: '--config',\n parameterShortName: '-c',\n argumentName: 'FILE',\n description: `Use the specified ${ExtractorConfig.FILENAME} file path, rather than guessing its location`\n });\n\n this._localParameter = this.defineFlagParameter({\n parameterLongName: '--local',\n parameterShortName: '-l',\n description:\n 'Indicates that API Extractor is running as part of a local build,' +\n \" e.g. on a developer's machine. This disables certain validation that would\" +\n ' normally be performed for a ship/production build. For example, the *.api.md' +\n ' report file is automatically copied in a local build.'\n });\n\n this._verboseParameter = this.defineFlagParameter({\n parameterLongName: '--verbose',\n parameterShortName: '-v',\n description: 'Show additional informational messages in the output.'\n });\n\n this._diagnosticsParameter = this.defineFlagParameter({\n parameterLongName: '--diagnostics',\n description:\n 'Show diagnostic messages used for troubleshooting problems with API Extractor.' +\n ' This flag also enables the \"--verbose\" flag.'\n });\n\n this._typescriptCompilerFolder = this.defineStringParameter({\n parameterLongName: '--typescript-compiler-folder',\n argumentName: 'PATH',\n description:\n 'API Extractor uses its own TypeScript compiler engine to analyze your project. If your project' +\n ' is built with a significantly different TypeScript version, sometimes API Extractor may report compilation' +\n ' errors due to differences in the system typings (e.g. lib.dom.d.ts). You can use the' +\n ' \"--typescriptCompilerFolder\" option to specify the folder path where you installed the TypeScript package,' +\n \" and API Extractor's compiler will use those system typings instead.\"\n });\n }\n\n protected override async onExecuteAsync(): Promise<void> {\n const lookup: PackageJsonLookup = new PackageJsonLookup();\n let configFilename: string;\n\n let typescriptCompilerFolder: string | undefined = this._typescriptCompilerFolder.value;\n if (typescriptCompilerFolder) {\n typescriptCompilerFolder = path.normalize(typescriptCompilerFolder);\n\n if (FileSystem.exists(typescriptCompilerFolder)) {\n typescriptCompilerFolder = lookup.tryGetPackageFolderFor(typescriptCompilerFolder);\n const typescriptCompilerPackageJson: IPackageJson | undefined = typescriptCompilerFolder\n ? lookup.tryLoadPackageJsonFor(typescriptCompilerFolder)\n : undefined;\n if (!typescriptCompilerPackageJson) {\n throw new Error(\n `The path specified in the ${this._typescriptCompilerFolder.longName} parameter is not a package.`\n );\n } else if (typescriptCompilerPackageJson.name !== 'typescript') {\n throw new Error(\n `The path specified in the ${this._typescriptCompilerFolder.longName} parameter is not a TypeScript` +\n ' compiler package.'\n );\n }\n } else {\n throw new Error(\n `The path specified in the ${this._typescriptCompilerFolder.longName} parameter does not exist.`\n );\n }\n }\n\n let extractorConfig: ExtractorConfig;\n\n if (this._configFileParameter.value) {\n configFilename = path.normalize(this._configFileParameter.value);\n if (!FileSystem.exists(configFilename)) {\n throw new Error('Config file not found: ' + this._configFileParameter.value);\n }\n\n extractorConfig = ExtractorConfig.loadFileAndPrepare(configFilename);\n } else {\n const prepareOptions: IExtractorConfigPrepareOptions | undefined = ExtractorConfig.tryLoadForFolder({\n startingFolder: '.'\n });\n\n if (!prepareOptions || !prepareOptions.configObjectFullPath) {\n throw new Error(`Unable to find an ${ExtractorConfig.FILENAME} file`);\n }\n\n const configObjectShortPath: string = Path.formatConcisely({\n pathToConvert: prepareOptions.configObjectFullPath,\n baseFolder: process.cwd()\n });\n console.log(`Using configuration from ${configObjectShortPath}`);\n\n extractorConfig = ExtractorConfig.prepare(prepareOptions);\n }\n\n const extractorResult: ExtractorResult = Extractor.invoke(extractorConfig, {\n localBuild: this._localParameter.value,\n showVerboseMessages: this._verboseParameter.value,\n showDiagnostics: this._diagnosticsParameter.value,\n typescriptCompilerFolder: typescriptCompilerFolder\n });\n\n if (extractorResult.succeeded) {\n console.log(os.EOL + 'API Extractor completed successfully');\n } else {\n if (extractorResult.errorCount > 0) {\n console.log(os.EOL + Colorize.red('API Extractor completed with errors'));\n } else {\n console.log(os.EOL + Colorize.yellow('API Extractor completed with warnings'));\n }\n throw new AlreadyReportedError();\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiItemMetadata.d.ts","sourceRoot":"","sources":["../../src/collector/ApiItemMetadata.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,kBAAkB,EAAE,UAAU,CAAC;IAC/B,mBAAmB,EAAE,UAAU,CAAC;IAChC,sBAAsB,EAAE,OAAO,CAAC;IAChC,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,eAAe;IAC1B;;OAEG;IACH,SAAgB,kBAAkB,EAAE,UAAU,CAAC;IAE/C;;;;;OAKG;IACH,SAAgB,mBAAmB,EAAE,UAAU,CAAC;IAGhD,SAAgB,sBAAsB,EAAE,OAAO,CAAC;IAIhD,SAAgB,eAAe,EAAE,OAAO,CAAC;IACzC,SAAgB,UAAU,EAAE,OAAO,CAAC;IACpC,SAAgB,QAAQ,EAAE,OAAO,CAAC;IAClC,SAAgB,SAAS,EAAE,OAAO,CAAC;IAEnC,SAAgB,aAAa,EAAE,OAAO,CAAC;IAEvC;;;OAGG;IACI,YAAY,EAAE,KAAK,CAAC,UAAU,GAAG,SAAS,CAAC;IAElD;;;;;;;;;;;;OAYG;IACI,YAAY,EAAE,OAAO,CAAQ;IAE7B,8BAA8B,EAAE,YAAY,CAA0B;gBAE1D,OAAO,EAAE,uBAAuB;CAUpD"}
1
+ {"version":3,"file":"ApiItemMetadata.d.ts","sourceRoot":"","sources":["../../src/collector/ApiItemMetadata.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,kBAAkB,EAAE,UAAU,CAAC;IAC/B,mBAAmB,EAAE,UAAU,CAAC;IAChC,sBAAsB,EAAE,OAAO,CAAC;IAChC,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,eAAe;IAC1B;;OAEG;IACH,SAAgB,kBAAkB,EAAE,UAAU,CAAC;IAE/C;;;;;OAKG;IACH,SAAgB,mBAAmB,EAAE,UAAU,CAAC;IAGhD,SAAgB,sBAAsB,EAAE,OAAO,CAAC;IAIhD,SAAgB,eAAe,EAAE,OAAO,CAAC;IACzC,SAAgB,UAAU,EAAE,OAAO,CAAC;IACpC,SAAgB,QAAQ,EAAE,OAAO,CAAC;IAClC,SAAgB,SAAS,EAAE,OAAO,CAAC;IAEnC,SAAgB,aAAa,EAAE,OAAO,CAAC;IAEvC;;;OAGG;IACI,YAAY,EAAE,KAAK,CAAC,UAAU,GAAG,SAAS,CAAC;IAElD;;;;;;;;;;;;OAYG;IACI,YAAY,EAAE,OAAO,CAAQ;IAE7B,8BAA8B,EAAE,YAAY,CAA0B;gBAE1D,OAAO,EAAE,uBAAuB;CAUpD"}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiItemMetadata.js","sourceRoot":"","sources":["../../src/collector/ApiItemMetadata.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D,iDAA8C;AAgB9C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,eAAe;IAiD1B,YAAmB,OAAgC;QAjBnD;;;;;;;;;;;;WAYG;QACI,iBAAY,GAAY,IAAI,CAAC;QAE7B,mCAA8B,GAAiB,2BAAY,CAAC,SAAS,CAAC;QAG3E,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;QACrD,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC;QACvD,IAAI,CAAC,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC;QAC7D,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAC7C,CAAC;CACF;AA3DD,0CA2DC","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 type * as tsdoc from '@microsoft/tsdoc';\nimport type { ReleaseTag } from '@microsoft/api-extractor-model';\nimport { VisitorState } from './VisitorState';\n\n/**\n * Constructor parameters for `ApiItemMetadata`.\n */\nexport interface IApiItemMetadataOptions {\n declaredReleaseTag: ReleaseTag;\n effectiveReleaseTag: ReleaseTag;\n releaseTagSameAsParent: boolean;\n isEventProperty: boolean;\n isOverride: boolean;\n isSealed: boolean;\n isVirtual: boolean;\n isPreapproved: boolean;\n}\n\n/**\n * Stores the Collector's additional analysis for an `AstDeclaration`. This object is assigned to\n * `AstDeclaration.apiItemMetadata` but consumers must always obtain it by calling `Collector.fetchApiItemMetadata()`.\n *\n * @remarks\n * Note that ancillary declarations share their `ApiItemMetadata` with the main declaration,\n * whereas a separate `DeclarationMetadata` object is created for each declaration.\n *\n * Consider this example:\n * ```ts\n * export declare class A {\n * get b(): string;\n * set b(value: string);\n * }\n * export declare namespace A { }\n * ```\n *\n * In this example, there are two \"symbols\": `A` and `b`\n *\n * There are four \"declarations\": `A` class, `A` namespace, `b` getter, `b` setter\n *\n * There are three \"API items\": `A` class, `A` namespace, `b` property. The property getter is the main declaration\n * for `b`, and the setter is the \"ancillary\" declaration.\n */\nexport class ApiItemMetadata {\n /**\n * This is the release tag that was explicitly specified in the original doc comment, if any.\n */\n public readonly declaredReleaseTag: ReleaseTag;\n\n /**\n * The \"effective\" release tag is a normalized value that is based on `declaredReleaseTag`,\n * but may be inherited from a parent, or corrected if the declared value was somehow invalid.\n * When actually trimming .d.ts files or generating docs, API Extractor uses the \"effective\" value\n * instead of the \"declared\" value.\n */\n public readonly effectiveReleaseTag: ReleaseTag;\n\n // If true, then it would be redundant to show this release tag\n public readonly releaseTagSameAsParent: boolean;\n\n // NOTE: In the future, the Collector may infer or error-correct some of these states.\n // Generators should rely on these instead of tsdocComment.modifierTagSet.\n public readonly isEventProperty: boolean;\n public readonly isOverride: boolean;\n public readonly isSealed: boolean;\n public readonly isVirtual: boolean;\n\n public readonly isPreapproved: boolean;\n\n /**\n * This is the TSDoc comment for the declaration. It may be modified (or constructed artificially) by\n * the DocCommentEnhancer.\n */\n public tsdocComment: tsdoc.DocComment | undefined;\n\n /**\n * Tracks whether or not the associated API item is known to be missing sufficient documentation.\n *\n * @remarks\n *\n * An \"undocumented\" item is one whose TSDoc comment which either does not contain a summary comment block, or\n * has an `@inheritDoc` tag that resolves to another \"undocumented\" API member.\n *\n * If there is any ambiguity (e.g. if an `@inheritDoc` comment points to an external API member, whose documentation,\n * we can't parse), \"undocumented\" will be `false`.\n *\n * @remarks Assigned by {@link DocCommentEnhancer}.\n */\n public undocumented: boolean = true;\n\n public docCommentEnhancerVisitorState: VisitorState = VisitorState.Unvisited;\n\n public constructor(options: IApiItemMetadataOptions) {\n this.declaredReleaseTag = options.declaredReleaseTag;\n this.effectiveReleaseTag = options.effectiveReleaseTag;\n this.releaseTagSameAsParent = options.releaseTagSameAsParent;\n this.isEventProperty = options.isEventProperty;\n this.isOverride = options.isOverride;\n this.isSealed = options.isSealed;\n this.isVirtual = options.isVirtual;\n this.isPreapproved = options.isPreapproved;\n }\n}\n"]}
1
+ {"version":3,"file":"ApiItemMetadata.js","sourceRoot":"","sources":["../../src/collector/ApiItemMetadata.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAK3D,iDAA8C;AAgB9C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,eAAe;IAiD1B,YAAmB,OAAgC;QAjBnD;;;;;;;;;;;;WAYG;QACI,iBAAY,GAAY,IAAI,CAAC;QAE7B,mCAA8B,GAAiB,2BAAY,CAAC,SAAS,CAAC;QAG3E,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;QACrD,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC;QACvD,IAAI,CAAC,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC;QAC7D,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAC7C,CAAC;CACF;AA3DD,0CA2DC","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 type * as tsdoc from '@microsoft/tsdoc';\nimport type { ReleaseTag } from '@microsoft/api-extractor-model';\n\nimport { VisitorState } from './VisitorState';\n\n/**\n * Constructor parameters for `ApiItemMetadata`.\n */\nexport interface IApiItemMetadataOptions {\n declaredReleaseTag: ReleaseTag;\n effectiveReleaseTag: ReleaseTag;\n releaseTagSameAsParent: boolean;\n isEventProperty: boolean;\n isOverride: boolean;\n isSealed: boolean;\n isVirtual: boolean;\n isPreapproved: boolean;\n}\n\n/**\n * Stores the Collector's additional analysis for an `AstDeclaration`. This object is assigned to\n * `AstDeclaration.apiItemMetadata` but consumers must always obtain it by calling `Collector.fetchApiItemMetadata()`.\n *\n * @remarks\n * Note that ancillary declarations share their `ApiItemMetadata` with the main declaration,\n * whereas a separate `DeclarationMetadata` object is created for each declaration.\n *\n * Consider this example:\n * ```ts\n * export declare class A {\n * get b(): string;\n * set b(value: string);\n * }\n * export declare namespace A { }\n * ```\n *\n * In this example, there are two \"symbols\": `A` and `b`\n *\n * There are four \"declarations\": `A` class, `A` namespace, `b` getter, `b` setter\n *\n * There are three \"API items\": `A` class, `A` namespace, `b` property. The property getter is the main declaration\n * for `b`, and the setter is the \"ancillary\" declaration.\n */\nexport class ApiItemMetadata {\n /**\n * This is the release tag that was explicitly specified in the original doc comment, if any.\n */\n public readonly declaredReleaseTag: ReleaseTag;\n\n /**\n * The \"effective\" release tag is a normalized value that is based on `declaredReleaseTag`,\n * but may be inherited from a parent, or corrected if the declared value was somehow invalid.\n * When actually trimming .d.ts files or generating docs, API Extractor uses the \"effective\" value\n * instead of the \"declared\" value.\n */\n public readonly effectiveReleaseTag: ReleaseTag;\n\n // If true, then it would be redundant to show this release tag\n public readonly releaseTagSameAsParent: boolean;\n\n // NOTE: In the future, the Collector may infer or error-correct some of these states.\n // Generators should rely on these instead of tsdocComment.modifierTagSet.\n public readonly isEventProperty: boolean;\n public readonly isOverride: boolean;\n public readonly isSealed: boolean;\n public readonly isVirtual: boolean;\n\n public readonly isPreapproved: boolean;\n\n /**\n * This is the TSDoc comment for the declaration. It may be modified (or constructed artificially) by\n * the DocCommentEnhancer.\n */\n public tsdocComment: tsdoc.DocComment | undefined;\n\n /**\n * Tracks whether or not the associated API item is known to be missing sufficient documentation.\n *\n * @remarks\n *\n * An \"undocumented\" item is one whose TSDoc comment which either does not contain a summary comment block, or\n * has an `@inheritDoc` tag that resolves to another \"undocumented\" API member.\n *\n * If there is any ambiguity (e.g. if an `@inheritDoc` comment points to an external API member, whose documentation,\n * we can't parse), \"undocumented\" will be `false`.\n *\n * @remarks Assigned by {@link DocCommentEnhancer}.\n */\n public undocumented: boolean = true;\n\n public docCommentEnhancerVisitorState: VisitorState = VisitorState.Unvisited;\n\n public constructor(options: IApiItemMetadataOptions) {\n this.declaredReleaseTag = options.declaredReleaseTag;\n this.effectiveReleaseTag = options.effectiveReleaseTag;\n this.releaseTagSameAsParent = options.releaseTagSameAsParent;\n this.isEventProperty = options.isEventProperty;\n this.isOverride = options.isOverride;\n this.isSealed = options.isSealed;\n this.isVirtual = options.isVirtual;\n this.isPreapproved = options.isPreapproved;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Collector.d.ts","sourceRoot":"","sources":["../../src/collector/Collector.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EACL,iBAAiB,EAKlB,MAAM,8BAA8B,CAAC;AAMtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,mBAAmB,EAA+B,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAgC,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAA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,GAAG,MAAM;IAelF;;;OAGG;IACI,gBAAgB,CAAC,cAAc,EAAE,cAAc,GAAG,MAAM;IA8B/D,OAAO,CAAC,sBAAsB;IA+B9B,OAAO,CAAC,0BAA0B;IAyClC;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAmFxB,OAAO,CAAC,oBAAoB;IAuC5B,OAAO,CAAC,4CAA4C;IAwCpD,OAAO,CAAC,wBAAwB;IA4ChC,OAAO,CAAC,yBAAyB;IAyKjC,OAAO,CAAC,4BAA4B;IAyDpC,OAAO,CAAC,2BAA2B;IA0BnC,OAAO,CAAC,0CAA0C;IA2ClD,OAAO,CAAC,oCAAoC;CAU7C"}
@@ -37,10 +37,10 @@ var __importStar = (this && this.__importStar) || (function () {
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
38
  exports.Collector = void 0;
39
39
  const ts = __importStar(require("typescript"));
40
+ const minimatch_1 = require("minimatch");
40
41
  const tsdoc = __importStar(require("@microsoft/tsdoc"));
41
- const node_core_library_1 = require("@rushstack/node-core-library");
42
42
  const api_extractor_model_1 = require("@microsoft/api-extractor-model");
43
- const minimatch_1 = require("minimatch");
43
+ const node_core_library_1 = require("@rushstack/node-core-library");
44
44
  const ExtractorMessageId_1 = require("../api/ExtractorMessageId");
45
45
  const CollectorEntity_1 = require("./CollectorEntity");
46
46
  const AstSymbolTable_1 = require("../analyzer/AstSymbolTable");
@@ -1 +1 @@
1
- {"version":3,"file":"Collector.js","sourceRoot":"","sources":["../../src/collector/Collector.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,+CAAiC;AACjC,wDAA0C;AAC1C,oEAMsC;AACtC,wEAA4D;AAC5D,yCAAsC;AAEtC,kEAA+D;AAE/D,uDAAoD;AACpD,+DAA4D;AAG5D,qDAAkD;AAElD,qEAAkE;AAClE,qDAAkD;AAClD,kEAA+D;AAC/D,+DAA8F;AAC9F,uDAAkF;AA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AAoC,CAC1C,cAAsB,EACtB,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAoB,EACxC,8BAAuC;QAEvC,MAAM,SAAS,GAAW,cAAc,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAC7D,IAAI,QAAQ,IAAI,CAAC,8BAA8B,EAAE,CAAC;YAChD,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;CACF;AAxgCD,8BAwgCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as ts from 'typescript';\nimport * as tsdoc from '@microsoft/tsdoc';\nimport {\n PackageJsonLookup,\n Sort,\n InternalError,\n type INodePackageJson,\n PackageName\n} from '@rushstack/node-core-library';\nimport { ReleaseTag } from '@microsoft/api-extractor-model';\nimport { minimatch } from 'minimatch';\n\nimport { ExtractorMessageId } from '../api/ExtractorMessageId';\n\nimport { CollectorEntity } from './CollectorEntity';\nimport { AstSymbolTable } from '../analyzer/AstSymbolTable';\nimport type { AstEntity } from '../analyzer/AstEntity';\nimport type { AstModule, IAstModuleExportInfo } from '../analyzer/AstModule';\nimport { AstSymbol } from '../analyzer/AstSymbol';\nimport type { AstDeclaration } from '../analyzer/AstDeclaration';\nimport { TypeScriptHelpers } from '../analyzer/TypeScriptHelpers';\nimport { WorkingPackage } from './WorkingPackage';\nimport { PackageDocComment } from '../aedoc/PackageDocComment';\nimport { type DeclarationMetadata, InternalDeclarationMetadata } from './DeclarationMetadata';\nimport { ApiItemMetadata, type IApiItemMetadataOptions } from './ApiItemMetadata';\nimport { SymbolMetadata } from './SymbolMetadata';\nimport { TypeScriptInternals, type IGlobalVariableAnalyzer } from '../analyzer/TypeScriptInternals';\nimport type { MessageRouter } from './MessageRouter';\nimport { AstReferenceResolver } from '../analyzer/AstReferenceResolver';\nimport { ExtractorConfig } from '../api/ExtractorConfig';\nimport { AstNamespaceImport } from '../analyzer/AstNamespaceImport';\nimport { AstImport } from '../analyzer/AstImport';\nimport type { SourceMapper } from './SourceMapper';\n\n/**\n * Options for Collector constructor.\n */\nexport interface ICollectorOptions {\n /**\n * Configuration for the TypeScript compiler. The most important options to set are:\n *\n * - target: ts.ScriptTarget.ES5\n * - module: ts.ModuleKind.CommonJS\n * - moduleResolution: ts.ModuleResolutionKind.NodeJs\n * - rootDir: inputFolder\n */\n program: ts.Program;\n\n messageRouter: MessageRouter;\n\n extractorConfig: ExtractorConfig;\n\n sourceMapper: SourceMapper;\n}\n\n/**\n * The `Collector` manages the overall data set that is used by `ApiModelGenerator`,\n * `DtsRollupGenerator`, and `ApiReportGenerator`. Starting from the working package's entry point,\n * the `Collector` collects all exported symbols, determines how to import any symbols they reference,\n * assigns unique names, and sorts everything into a normalized alphabetical ordering.\n */\nexport class Collector {\n public readonly program: ts.Program;\n public readonly typeChecker: ts.TypeChecker;\n public readonly globalVariableAnalyzer: IGlobalVariableAnalyzer;\n public readonly astSymbolTable: AstSymbolTable;\n public readonly astReferenceResolver: AstReferenceResolver;\n\n public readonly packageJsonLookup: PackageJsonLookup;\n public readonly messageRouter: MessageRouter;\n\n public readonly workingPackage: WorkingPackage;\n\n public readonly extractorConfig: ExtractorConfig;\n\n public readonly sourceMapper: SourceMapper;\n\n /**\n * The `ExtractorConfig.bundledPackages` names in a set.\n */\n public readonly bundledPackageNames: ReadonlySet<string>;\n\n private readonly _program: ts.Program;\n\n private readonly _tsdocParser: tsdoc.TSDocParser;\n\n private _astEntryPoint: AstModule | undefined;\n\n private readonly _entities: CollectorEntity[] = [];\n private readonly _entitiesByAstEntity: Map<AstEntity, CollectorEntity> = new Map<\n AstEntity,\n CollectorEntity\n >();\n private readonly _entitiesBySymbol: Map<ts.Symbol, CollectorEntity> = new Map<ts.Symbol, CollectorEntity>();\n\n private readonly _starExportedExternalModulePaths: string[] = [];\n\n private readonly _dtsTypeReferenceDirectives: Set<string> = new Set<string>();\n private readonly _dtsLibReferenceDirectives: Set<string> = new Set<string>();\n\n // Used by getOverloadIndex()\n private readonly _cachedOverloadIndexesByDeclaration: Map<AstDeclaration, number>;\n\n public constructor(options: ICollectorOptions) {\n this.packageJsonLookup = new PackageJsonLookup();\n\n this._program = options.program;\n this.extractorConfig = options.extractorConfig;\n this.sourceMapper = options.sourceMapper;\n\n const entryPointSourceFile: ts.SourceFile | undefined = options.program.getSourceFile(\n this.extractorConfig.mainEntryPointFilePath\n );\n\n if (!entryPointSourceFile) {\n throw new Error('Unable to load file: ' + this.extractorConfig.mainEntryPointFilePath);\n }\n\n if (!this.extractorConfig.packageFolder || !this.extractorConfig.packageJson) {\n // TODO: We should be able to analyze projects that don't have any package.json.\n // The ExtractorConfig class is already designed to allow this.\n throw new Error('Unable to find a package.json file for the project being analyzed');\n }\n\n this.workingPackage = new WorkingPackage({\n packageFolder: this.extractorConfig.packageFolder,\n packageJson: this.extractorConfig.packageJson,\n entryPointSourceFile\n });\n\n this.messageRouter = options.messageRouter;\n\n this.program = options.program;\n this.typeChecker = options.program.getTypeChecker();\n this.globalVariableAnalyzer = TypeScriptInternals.getGlobalVariableAnalyzer(this.program);\n\n this._tsdocParser = new tsdoc.TSDocParser(this.extractorConfig.tsdocConfiguration);\n\n // Resolve package name patterns and store concrete set of bundled package dependency names\n this.bundledPackageNames = Collector._resolveBundledPackagePatterns(\n this.extractorConfig.bundledPackages,\n this.extractorConfig.packageJson\n );\n\n this.astSymbolTable = new AstSymbolTable(\n this.program,\n this.typeChecker,\n this.packageJsonLookup,\n this.bundledPackageNames,\n this.messageRouter\n );\n this.astReferenceResolver = new AstReferenceResolver(this);\n\n this._cachedOverloadIndexesByDeclaration = new Map<AstDeclaration, number>();\n }\n\n /**\n * Resolve provided `bundledPackages` names and glob patterns to a list of explicit package names.\n *\n * @remarks\n * Explicit package names will be included in the output unconditionally. However, wildcard patterns will\n * only be matched against the various dependencies listed in the provided package.json (if there was one).\n * Patterns will be matched against `dependencies`, `devDependencies`, `optionalDependencies`, and `peerDependencies`.\n *\n * @param bundledPackages - The list of package names and/or glob patterns to resolve.\n * @param packageJson - The package.json of the package being processed (if there is one).\n * @returns The set of resolved package names to be bundled during analysis.\n */\n private static _resolveBundledPackagePatterns(\n bundledPackages: string[],\n packageJson: INodePackageJson | undefined\n ): ReadonlySet<string> {\n if (bundledPackages.length === 0) {\n // If no `bundledPackages` were specified, then there is nothing to resolve.\n // Return an empty set.\n return new Set<string>();\n }\n\n // Accumulate all declared dependencies.\n // Any wildcard patterns in `bundledPackages` will be resolved against these.\n const dependencyNames: Set<string> = new Set<string>();\n Object.keys(packageJson?.dependencies ?? {}).forEach((dep) => dependencyNames.add(dep));\n Object.keys(packageJson?.devDependencies ?? {}).forEach((dep) => dependencyNames.add(dep));\n Object.keys(packageJson?.peerDependencies ?? {}).forEach((dep) => dependencyNames.add(dep));\n Object.keys(packageJson?.optionalDependencies ?? {}).forEach((dep) => dependencyNames.add(dep));\n\n // The set of resolved package names to be populated and returned\n const resolvedPackageNames: Set<string> = new Set<string>();\n\n for (const packageNameOrPattern of bundledPackages) {\n // If the string is an exact package name, use it regardless of package.json contents\n if (PackageName.isValidName(packageNameOrPattern)) {\n resolvedPackageNames.add(packageNameOrPattern);\n } else {\n // If the entry isn't an exact package name, assume glob pattern and search for matches\n for (const dependencyName of dependencyNames) {\n if (minimatch(dependencyName, packageNameOrPattern)) {\n resolvedPackageNames.add(dependencyName);\n }\n }\n }\n }\n return resolvedPackageNames;\n }\n\n /**a\n * Returns a list of names (e.g. \"example-library\") that should appear in a reference like this:\n *\n * ```\n * /// <reference types=\"example-library\" />\n * ```\n */\n public get dtsTypeReferenceDirectives(): ReadonlySet<string> {\n return this._dtsTypeReferenceDirectives;\n }\n\n /**\n * A list of names (e.g. \"runtime-library\") that should appear in a reference like this:\n *\n * ```\n * /// <reference lib=\"runtime-library\" />\n * ```\n */\n public get dtsLibReferenceDirectives(): ReadonlySet<string> {\n return this._dtsLibReferenceDirectives;\n }\n\n public get entities(): ReadonlyArray<CollectorEntity> {\n return this._entities;\n }\n\n /**\n * A list of module specifiers (e.g. `\"@rushstack/node-core-library/lib/FileSystem\"`) that should be emitted\n * as star exports (e.g. `export * from \"@rushstack/node-core-library/lib/FileSystem\"`).\n */\n public get starExportedExternalModulePaths(): ReadonlyArray<string> {\n return this._starExportedExternalModulePaths;\n }\n\n /**\n * Perform the analysis.\n */\n public analyze(): void {\n if (this._astEntryPoint) {\n throw new Error('DtsRollupGenerator.analyze() was already called');\n }\n\n // This runs a full type analysis, and then augments the Abstract Syntax Tree (i.e. declarations)\n // with semantic information (i.e. symbols). The \"diagnostics\" are a subset of the everyday\n // compile errors that would result from a full compilation.\n for (const diagnostic of this._program.getSemanticDiagnostics()) {\n this.messageRouter.addCompilerDiagnostic(diagnostic);\n }\n\n const sourceFiles: readonly ts.SourceFile[] = this.program.getSourceFiles();\n\n if (this.messageRouter.showDiagnostics) {\n this.messageRouter.logDiagnosticHeader('Root filenames');\n for (const fileName of this.program.getRootFileNames()) {\n this.messageRouter.logDiagnostic(fileName);\n }\n this.messageRouter.logDiagnosticFooter();\n\n this.messageRouter.logDiagnosticHeader('Files analyzed by compiler');\n for (const sourceFile of sourceFiles) {\n this.messageRouter.logDiagnostic(sourceFile.fileName);\n }\n this.messageRouter.logDiagnosticFooter();\n }\n\n // We can throw this error earlier in CompilerState.ts, but intentionally wait until after we've logged the\n // associated diagnostic message above to make debugging easier for developers.\n // Typically there will be many such files -- to avoid too much noise, only report the first one.\n const badSourceFile: ts.SourceFile | undefined = sourceFiles.find(\n ({ fileName }) => !ExtractorConfig.hasDtsFileExtension(fileName)\n );\n if (badSourceFile) {\n this.messageRouter.addAnalyzerIssueForPosition(\n ExtractorMessageId.WrongInputFileType,\n 'Incorrect file type; API Extractor expects to analyze compiler outputs with the .d.ts file extension. ' +\n 'Troubleshooting tips: https://api-extractor.com/link/dts-error',\n badSourceFile,\n 0\n );\n }\n\n // Build the entry point\n const entryPointSourceFile: ts.SourceFile = this.workingPackage.entryPointSourceFile;\n\n const astEntryPoint: AstModule =\n this.astSymbolTable.fetchAstModuleFromWorkingPackage(entryPointSourceFile);\n this._astEntryPoint = astEntryPoint;\n\n const packageDocCommentTextRange: ts.TextRange | undefined = PackageDocComment.tryFindInSourceFile(\n entryPointSourceFile,\n this\n );\n\n if (packageDocCommentTextRange) {\n const range: tsdoc.TextRange = tsdoc.TextRange.fromStringRange(\n entryPointSourceFile.text,\n packageDocCommentTextRange.pos,\n packageDocCommentTextRange.end\n );\n\n this.workingPackage.tsdocParserContext = this._tsdocParser.parseRange(range);\n\n this.messageRouter.addTsdocMessages(this.workingPackage.tsdocParserContext, entryPointSourceFile);\n\n this.workingPackage.tsdocComment = this.workingPackage.tsdocParserContext!.docComment;\n }\n\n const { exportedLocalEntities, starExportedExternalModules, visitedAstModules }: IAstModuleExportInfo =\n this.astSymbolTable.fetchAstModuleExportInfo(astEntryPoint);\n\n // Create a CollectorEntity for each top-level export.\n const processedAstEntities: AstEntity[] = [];\n for (const [exportName, astEntity] of exportedLocalEntities) {\n this._createCollectorEntity(astEntity, exportName);\n processedAstEntities.push(astEntity);\n }\n\n // Recursively create the remaining CollectorEntities after the top-level entities\n // have been processed.\n const alreadySeenAstEntities: Set<AstEntity> = new Set<AstEntity>();\n for (const astEntity of processedAstEntities) {\n this._recursivelyCreateEntities(astEntity, alreadySeenAstEntities);\n if (astEntity instanceof AstSymbol) {\n this.fetchSymbolMetadata(astEntity);\n }\n }\n\n // Ensure references are collected from any intermediate files that\n // only include exports\n const nonExternalSourceFiles: Set<ts.SourceFile> = new Set();\n for (const { sourceFile, isExternal } of visitedAstModules) {\n if (!nonExternalSourceFiles.has(sourceFile) && !isExternal) {\n nonExternalSourceFiles.add(sourceFile);\n }\n }\n\n // Here, we're collecting reference directives from all non-external source files\n // that were encountered while looking for exports, but only those references that\n // were explicitly written by the developer and marked with the `preserve=\"true\"`\n // attribute. In TS >= 5.5, only references that are explicitly authored and marked\n // with `preserve=\"true\"` are included in the output. See https://github.com/microsoft/TypeScript/pull/57681\n //\n // The `_collectReferenceDirectives` function pulls in all references in files that\n // contain definitions, but does not examine files that only reexport from other\n // files. Here, we're looking through files that were missed by `_collectReferenceDirectives`,\n // but only collecting references that were explicitly marked with `preserve=\"true\"`.\n // It is intuitive for developers to include references that they explicitly want part of\n // their public API in a file like the entrypoint, which is likely to only contain reexports,\n // and this picks those up.\n this._collectReferenceDirectivesFromSourceFiles(nonExternalSourceFiles, true);\n\n this._makeUniqueNames();\n\n for (const starExportedExternalModule of starExportedExternalModules) {\n if (starExportedExternalModule.externalModulePath !== undefined) {\n this._starExportedExternalModulePaths.push(starExportedExternalModule.externalModulePath);\n }\n }\n\n Sort.sortBy(this._entities, (x) => x.getSortKey());\n Sort.sortSet(this._dtsTypeReferenceDirectives);\n Sort.sortSet(this._dtsLibReferenceDirectives);\n this._starExportedExternalModulePaths.sort();\n }\n\n /**\n * For a given ts.Identifier that is part of an AstSymbol that we analyzed, return the CollectorEntity that\n * it refers to. Returns undefined if it doesn't refer to anything interesting.\n * @remarks\n * Throws an Error if the ts.Identifier is not part of node tree that was analyzed.\n */\n public tryGetEntityForNode(identifier: ts.Identifier | ts.ImportTypeNode): CollectorEntity | undefined {\n const astEntity: AstEntity | undefined = this.astSymbolTable.tryGetEntityForNode(identifier);\n if (astEntity) {\n return this._entitiesByAstEntity.get(astEntity);\n }\n return undefined;\n }\n\n /**\n * For a given analyzed ts.Symbol, return the CollectorEntity that it refers to. Returns undefined if it\n * doesn't refer to anything interesting.\n */\n public tryGetEntityForSymbol(symbol: ts.Symbol): CollectorEntity | undefined {\n return this._entitiesBySymbol.get(symbol);\n }\n\n /**\n * Returns the associated `CollectorEntity` for the given `astEntity`, if one was created during analysis.\n */\n public tryGetCollectorEntity(astEntity: AstEntity): CollectorEntity | undefined {\n return this._entitiesByAstEntity.get(astEntity);\n }\n\n public fetchSymbolMetadata(astSymbol: AstSymbol): SymbolMetadata {\n if (astSymbol.symbolMetadata === undefined) {\n this._fetchSymbolMetadata(astSymbol);\n }\n return astSymbol.symbolMetadata as SymbolMetadata;\n }\n\n public fetchDeclarationMetadata(astDeclaration: AstDeclaration): DeclarationMetadata {\n if (astDeclaration.declarationMetadata === undefined) {\n // Fetching the SymbolMetadata always constructs the DeclarationMetadata\n this._fetchSymbolMetadata(astDeclaration.astSymbol);\n }\n return astDeclaration.declarationMetadata as DeclarationMetadata;\n }\n\n public fetchApiItemMetadata(astDeclaration: AstDeclaration): ApiItemMetadata {\n if (astDeclaration.apiItemMetadata === undefined) {\n // Fetching the SymbolMetadata always constructs the ApiItemMetadata\n this._fetchSymbolMetadata(astDeclaration.astSymbol);\n }\n return astDeclaration.apiItemMetadata as ApiItemMetadata;\n }\n\n public tryFetchMetadataForAstEntity(astEntity: AstEntity): SymbolMetadata | undefined {\n if (astEntity instanceof AstSymbol) {\n return this.fetchSymbolMetadata(astEntity);\n }\n if (astEntity instanceof AstImport) {\n if (astEntity.astSymbol) {\n return this.fetchSymbolMetadata(astEntity.astSymbol);\n }\n }\n return undefined;\n }\n\n public isAncillaryDeclaration(astDeclaration: AstDeclaration): boolean {\n const declarationMetadata: DeclarationMetadata = this.fetchDeclarationMetadata(astDeclaration);\n return declarationMetadata.isAncillary;\n }\n\n public getNonAncillaryDeclarations(astSymbol: AstSymbol): ReadonlyArray<AstDeclaration> {\n const result: AstDeclaration[] = [];\n for (const astDeclaration of astSymbol.astDeclarations) {\n const declarationMetadata: DeclarationMetadata = this.fetchDeclarationMetadata(astDeclaration);\n if (!declarationMetadata.isAncillary) {\n result.push(astDeclaration);\n }\n }\n return result;\n }\n\n /**\n * Removes the leading underscore, for example: \"_Example\" --> \"example*Example*_\"\n *\n * @remarks\n * This causes internal definitions to sort alphabetically case-insensitive, then case-sensitive, and\n * initially ignoring the underscore prefix, while still deterministically comparing it.\n * The star is used as a delimiter because it is not a legal identifier character.\n */\n public static getSortKeyIgnoringUnderscore(identifier: string | undefined): string {\n if (!identifier) return '';\n\n let parts: string[];\n\n if (identifier[0] === '_') {\n const withoutUnderscore: string = identifier.substr(1);\n parts = [withoutUnderscore.toLowerCase(), '*', withoutUnderscore, '*', '_'];\n } else {\n parts = [identifier.toLowerCase(), '*', identifier];\n }\n\n return parts.join('');\n }\n\n /**\n * For function-like signatures, this returns the TSDoc \"overload index\" which can be used to identify\n * a specific overload.\n */\n public getOverloadIndex(astDeclaration: AstDeclaration): number {\n const allDeclarations: ReadonlyArray<AstDeclaration> = astDeclaration.astSymbol.astDeclarations;\n if (allDeclarations.length === 1) {\n return 1; // trivial case\n }\n\n let overloadIndex: number | undefined = this._cachedOverloadIndexesByDeclaration.get(astDeclaration);\n\n if (overloadIndex === undefined) {\n // TSDoc index selectors are positive integers counting from 1\n let nextIndex: number = 1;\n for (const other of allDeclarations) {\n // Filter out other declarations that are not overloads. For example, an overloaded function can also\n // be a namespace.\n if (other.declaration.kind === astDeclaration.declaration.kind) {\n this._cachedOverloadIndexesByDeclaration.set(other, nextIndex);\n ++nextIndex;\n }\n }\n overloadIndex = this._cachedOverloadIndexesByDeclaration.get(astDeclaration);\n }\n\n if (overloadIndex === undefined) {\n // This should never happen\n throw new InternalError('Error calculating overload index for declaration');\n }\n\n return overloadIndex;\n }\n\n private _createCollectorEntity(\n astEntity: AstEntity,\n exportName?: string,\n parent?: CollectorEntity\n ): CollectorEntity {\n let entity: CollectorEntity | undefined = this._entitiesByAstEntity.get(astEntity);\n\n if (!entity) {\n entity = new CollectorEntity(astEntity);\n\n this._entitiesByAstEntity.set(astEntity, entity);\n if (astEntity instanceof AstSymbol) {\n this._entitiesBySymbol.set(astEntity.followedSymbol, entity);\n } else if (astEntity instanceof AstNamespaceImport) {\n this._entitiesBySymbol.set(astEntity.symbol, entity);\n }\n this._entities.push(entity);\n this._collectReferenceDirectives(astEntity);\n }\n\n if (exportName) {\n if (parent) {\n entity.addLocalExportName(exportName, parent);\n } else {\n entity.addExportName(exportName);\n }\n }\n\n return entity;\n }\n\n private _recursivelyCreateEntities(astEntity: AstEntity, alreadySeenAstEntities: Set<AstEntity>): void {\n if (alreadySeenAstEntities.has(astEntity)) return;\n alreadySeenAstEntities.add(astEntity);\n\n if (astEntity instanceof AstSymbol) {\n astEntity.forEachDeclarationRecursive((astDeclaration: AstDeclaration) => {\n for (const referencedAstEntity of astDeclaration.referencedAstEntities) {\n if (referencedAstEntity instanceof AstSymbol) {\n // We only create collector entities for root-level symbols. For example, if a symbol is\n // nested inside a namespace, only the namespace gets a collector entity. Note that this\n // is not true for AstNamespaceImports below.\n if (referencedAstEntity.parentAstSymbol === undefined) {\n this._createCollectorEntity(referencedAstEntity);\n }\n } else {\n this._createCollectorEntity(referencedAstEntity);\n }\n\n this._recursivelyCreateEntities(referencedAstEntity, alreadySeenAstEntities);\n }\n });\n }\n\n if (astEntity instanceof AstNamespaceImport) {\n const astModuleExportInfo: IAstModuleExportInfo = astEntity.fetchAstModuleExportInfo(this);\n const parentEntity: CollectorEntity | undefined = this._entitiesByAstEntity.get(astEntity);\n if (!parentEntity) {\n // This should never happen, as we've already created entities for all AstNamespaceImports.\n throw new InternalError(\n `Failed to get CollectorEntity for AstNamespaceImport with namespace name \"${astEntity.namespaceName}\"`\n );\n }\n\n for (const [localExportName, localAstEntity] of astModuleExportInfo.exportedLocalEntities) {\n // Create a CollectorEntity for each local export within an AstNamespaceImport entity.\n this._createCollectorEntity(localAstEntity, localExportName, parentEntity);\n this._recursivelyCreateEntities(localAstEntity, alreadySeenAstEntities);\n }\n }\n }\n\n /**\n * Ensures a unique name for each item in the package typings file.\n */\n private _makeUniqueNames(): void {\n // The following examples illustrate the nameForEmit heuristics:\n //\n // Example 1:\n // class X { } <--- nameForEmit should be \"A\" to simplify things and reduce possibility of conflicts\n // export { X as A };\n //\n // Example 2:\n // class X { } <--- nameForEmit should be \"X\" because choosing A or B would be nondeterministic\n // export { X as A };\n // export { X as B };\n //\n // Example 3:\n // class X { } <--- nameForEmit should be \"X_1\" because Y has a stronger claim to the name\n // export { X as A };\n // export { X as B };\n // class Y { } <--- nameForEmit should be \"X\"\n // export { Y as X };\n\n // Set of names that should NOT be used when generating a unique nameForEmit\n const usedNames: Set<string> = new Set<string>();\n\n // First collect the names of explicit package exports, and perform a sanity check.\n for (const entity of this._entities) {\n for (const exportName of entity.exportNames) {\n if (usedNames.has(exportName)) {\n // This should be impossible\n throw new InternalError(`A package cannot have two exports with the name \"${exportName}\"`);\n }\n usedNames.add(exportName);\n }\n }\n\n // Ensure that each entity has a unique nameForEmit\n for (const entity of this._entities) {\n // What name would we ideally want to emit it as?\n let idealNameForEmit: string;\n\n // If this entity is exported exactly once, then we prefer the exported name\n if (\n entity.singleExportName !== undefined &&\n entity.singleExportName !== ts.InternalSymbolName.Default\n ) {\n idealNameForEmit = entity.singleExportName;\n } else {\n // otherwise use the local name\n idealNameForEmit = entity.astEntity.localName;\n }\n\n if (idealNameForEmit.includes('.')) {\n // For an ImportType with a namespace chain, only the top namespace is imported.\n idealNameForEmit = idealNameForEmit.split('.')[0];\n }\n\n // If the idealNameForEmit happens to be the same as one of the exports, then we're safe to use that...\n if (entity.exportNames.has(idealNameForEmit)) {\n // ...except that if it conflicts with a global name, then the global name wins\n if (!this.globalVariableAnalyzer.hasGlobalName(idealNameForEmit)) {\n // ...also avoid \"default\" which can interfere with \"export { default } from 'some-module;'\"\n if (idealNameForEmit !== 'default') {\n entity.nameForEmit = idealNameForEmit;\n continue;\n }\n }\n }\n\n // Generate a unique name based on idealNameForEmit\n let suffix: number = 1;\n let nameForEmit: string = idealNameForEmit;\n\n // Choose a name that doesn't conflict with usedNames or a global name\n while (\n nameForEmit === 'default' ||\n usedNames.has(nameForEmit) ||\n this.globalVariableAnalyzer.hasGlobalName(nameForEmit)\n ) {\n nameForEmit = `${idealNameForEmit}_${++suffix}`;\n }\n entity.nameForEmit = nameForEmit;\n usedNames.add(nameForEmit);\n }\n }\n\n private _fetchSymbolMetadata(astSymbol: AstSymbol): void {\n if (astSymbol.symbolMetadata) {\n return;\n }\n\n // When we solve an astSymbol, then we always also solve all of its parents and all of its declarations.\n // The parent is solved first.\n if (astSymbol.parentAstSymbol && astSymbol.parentAstSymbol.symbolMetadata === undefined) {\n this._fetchSymbolMetadata(astSymbol.parentAstSymbol);\n }\n\n // Construct the DeclarationMetadata objects, and detect any ancillary declarations\n this._calculateDeclarationMetadataForDeclarations(astSymbol);\n\n // Calculate the ApiItemMetadata objects\n for (const astDeclaration of astSymbol.astDeclarations) {\n this._calculateApiItemMetadata(astDeclaration);\n }\n\n // The most public effectiveReleaseTag for all declarations\n let maxEffectiveReleaseTag: ReleaseTag = ReleaseTag.None;\n\n for (const astDeclaration of astSymbol.astDeclarations) {\n // We know we solved this above\n const apiItemMetadata: ApiItemMetadata = astDeclaration.apiItemMetadata as ApiItemMetadata;\n\n const effectiveReleaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n\n if (effectiveReleaseTag > maxEffectiveReleaseTag) {\n maxEffectiveReleaseTag = effectiveReleaseTag;\n }\n }\n\n // Update this last when we're sure no exceptions were thrown\n astSymbol.symbolMetadata = new SymbolMetadata({\n maxEffectiveReleaseTag\n });\n }\n\n private _calculateDeclarationMetadataForDeclarations(astSymbol: AstSymbol): void {\n // Initialize DeclarationMetadata for each declaration\n for (const astDeclaration of astSymbol.astDeclarations) {\n if (astDeclaration.declarationMetadata) {\n throw new InternalError(\n 'AstDeclaration.declarationMetadata is not expected to have been initialized yet'\n );\n }\n\n const metadata: InternalDeclarationMetadata = new InternalDeclarationMetadata();\n metadata.tsdocParserContext = this._parseTsdocForAstDeclaration(astDeclaration);\n\n astDeclaration.declarationMetadata = metadata;\n }\n\n // Detect ancillary declarations\n for (const astDeclaration of astSymbol.astDeclarations) {\n // For a getter/setter pair, make the setter ancillary to the getter\n if (astDeclaration.declaration.kind === ts.SyntaxKind.SetAccessor) {\n let foundGetter: boolean = false;\n for (const getterAstDeclaration of astDeclaration.astSymbol.astDeclarations) {\n if (getterAstDeclaration.declaration.kind === ts.SyntaxKind.GetAccessor) {\n // Associate it with the getter\n this._addAncillaryDeclaration(getterAstDeclaration, astDeclaration);\n\n foundGetter = true;\n }\n }\n\n if (!foundGetter) {\n this.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.MissingGetter,\n `The property \"${astDeclaration.astSymbol.localName}\" has a setter but no getter.`,\n astDeclaration\n );\n }\n }\n }\n }\n\n private _addAncillaryDeclaration(\n mainAstDeclaration: AstDeclaration,\n ancillaryAstDeclaration: AstDeclaration\n ): void {\n const mainMetadata: InternalDeclarationMetadata =\n mainAstDeclaration.declarationMetadata as InternalDeclarationMetadata;\n const ancillaryMetadata: InternalDeclarationMetadata =\n ancillaryAstDeclaration.declarationMetadata as InternalDeclarationMetadata;\n\n if (mainMetadata.ancillaryDeclarations.indexOf(ancillaryAstDeclaration) >= 0) {\n return; // already added\n }\n\n if (mainAstDeclaration.astSymbol !== ancillaryAstDeclaration.astSymbol) {\n throw new InternalError(\n 'Invalid call to _addAncillaryDeclaration() because declarations do not' +\n ' belong to the same symbol'\n );\n }\n\n if (mainMetadata.isAncillary) {\n throw new InternalError(\n 'Invalid call to _addAncillaryDeclaration() because the target is ancillary itself'\n );\n }\n\n if (ancillaryMetadata.isAncillary) {\n throw new InternalError(\n 'Invalid call to _addAncillaryDeclaration() because source is already ancillary' +\n ' to another declaration'\n );\n }\n\n if (mainAstDeclaration.apiItemMetadata || ancillaryAstDeclaration.apiItemMetadata) {\n throw new InternalError(\n 'Invalid call to _addAncillaryDeclaration() because the API item metadata' +\n ' has already been constructed'\n );\n }\n\n ancillaryMetadata.isAncillary = true;\n mainMetadata.ancillaryDeclarations.push(ancillaryAstDeclaration);\n }\n\n private _calculateApiItemMetadata(astDeclaration: AstDeclaration): void {\n const declarationMetadata: InternalDeclarationMetadata =\n astDeclaration.declarationMetadata as InternalDeclarationMetadata;\n if (declarationMetadata.isAncillary) {\n if (astDeclaration.declaration.kind === ts.SyntaxKind.SetAccessor) {\n if (declarationMetadata.tsdocParserContext) {\n this.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.SetterWithDocs,\n `The doc comment for the property \"${astDeclaration.astSymbol.localName}\"` +\n ` must appear on the getter, not the setter.`,\n astDeclaration\n );\n }\n }\n\n // We never calculate ApiItemMetadata for an ancillary declaration; instead, it is assigned when\n // the main declaration is processed.\n return;\n }\n\n const options: IApiItemMetadataOptions = {\n declaredReleaseTag: ReleaseTag.None,\n effectiveReleaseTag: ReleaseTag.None,\n isEventProperty: false,\n isOverride: false,\n isSealed: false,\n isVirtual: false,\n isPreapproved: false,\n releaseTagSameAsParent: false\n };\n\n const parserContext: tsdoc.ParserContext | undefined = declarationMetadata.tsdocParserContext;\n if (parserContext) {\n const modifierTagSet: tsdoc.StandardModifierTagSet = parserContext.docComment.modifierTagSet;\n\n let declaredReleaseTag: ReleaseTag = ReleaseTag.None;\n let extraReleaseTags: boolean = false;\n\n if (modifierTagSet.isPublic()) {\n declaredReleaseTag = ReleaseTag.Public;\n }\n if (modifierTagSet.isBeta()) {\n if (declaredReleaseTag !== ReleaseTag.None) {\n extraReleaseTags = true;\n } else {\n declaredReleaseTag = ReleaseTag.Beta;\n }\n }\n if (modifierTagSet.isAlpha()) {\n if (declaredReleaseTag !== ReleaseTag.None) {\n extraReleaseTags = true;\n } else {\n declaredReleaseTag = ReleaseTag.Alpha;\n }\n }\n if (modifierTagSet.isInternal()) {\n if (declaredReleaseTag !== ReleaseTag.None) {\n extraReleaseTags = true;\n } else {\n declaredReleaseTag = ReleaseTag.Internal;\n }\n }\n\n if (extraReleaseTags) {\n if (!astDeclaration.astSymbol.isExternal) {\n // for now, don't report errors for external code\n this.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.ExtraReleaseTag,\n 'The doc comment should not contain more than one release tag',\n astDeclaration\n );\n }\n }\n\n options.declaredReleaseTag = declaredReleaseTag;\n\n options.isEventProperty = modifierTagSet.isEventProperty();\n options.isOverride = modifierTagSet.isOverride();\n options.isSealed = modifierTagSet.isSealed();\n options.isVirtual = modifierTagSet.isVirtual();\n const preapprovedTag: tsdoc.TSDocTagDefinition | void =\n this.extractorConfig.tsdocConfiguration.tryGetTagDefinition('@preapproved');\n\n if (preapprovedTag && modifierTagSet.hasTag(preapprovedTag)) {\n // This feature only makes sense for potentially big declarations.\n switch (astDeclaration.declaration.kind) {\n case ts.SyntaxKind.ClassDeclaration:\n case ts.SyntaxKind.EnumDeclaration:\n case ts.SyntaxKind.InterfaceDeclaration:\n case ts.SyntaxKind.ModuleDeclaration:\n if (declaredReleaseTag === ReleaseTag.Internal) {\n options.isPreapproved = true;\n } else {\n this.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.PreapprovedBadReleaseTag,\n `The @preapproved tag cannot be applied to \"${astDeclaration.astSymbol.localName}\"` +\n ` without an @internal release tag`,\n astDeclaration\n );\n }\n break;\n default:\n this.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.PreapprovedUnsupportedType,\n `The @preapproved tag cannot be applied to \"${astDeclaration.astSymbol.localName}\"` +\n ` because it is not a supported declaration type`,\n astDeclaration\n );\n break;\n }\n }\n }\n\n // This needs to be set regardless of whether or not a parserContext exists\n if (astDeclaration.parent) {\n const parentApiItemMetadata: ApiItemMetadata = this.fetchApiItemMetadata(astDeclaration.parent);\n options.effectiveReleaseTag =\n options.declaredReleaseTag === ReleaseTag.None\n ? parentApiItemMetadata.effectiveReleaseTag\n : options.declaredReleaseTag;\n\n options.releaseTagSameAsParent =\n parentApiItemMetadata.effectiveReleaseTag === options.effectiveReleaseTag;\n } else {\n options.effectiveReleaseTag = options.declaredReleaseTag;\n }\n\n if (options.effectiveReleaseTag === ReleaseTag.None) {\n if (!astDeclaration.astSymbol.isExternal) {\n // for now, don't report errors for external code\n // Don't report missing release tags for forgotten exports (unless we're including forgotten exports\n // in either the API report or doc model).\n const astSymbol: AstSymbol = astDeclaration.astSymbol;\n const entity: CollectorEntity | undefined = this._entitiesByAstEntity.get(astSymbol.rootAstSymbol);\n if (\n entity &&\n (entity.consumable ||\n this.extractorConfig.apiReportIncludeForgottenExports ||\n this.extractorConfig.docModelIncludeForgottenExports)\n ) {\n // We also don't report errors for the default export of an entry point, since its doc comment\n // isn't easy to obtain from the .d.ts file\n if (astSymbol.rootAstSymbol.localName !== '_default') {\n this.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.MissingReleaseTag,\n `\"${entity.astEntity.localName}\" is part of the package's API, but it is missing ` +\n `a release tag (@alpha, @beta, @public, or @internal)`,\n astSymbol\n );\n }\n }\n }\n\n options.effectiveReleaseTag = ReleaseTag.Public;\n }\n\n const apiItemMetadata: ApiItemMetadata = new ApiItemMetadata(options);\n if (parserContext) {\n apiItemMetadata.tsdocComment = parserContext.docComment;\n }\n\n astDeclaration.apiItemMetadata = apiItemMetadata;\n\n // Lastly, share the result with any ancillary declarations\n for (const ancillaryDeclaration of declarationMetadata.ancillaryDeclarations) {\n ancillaryDeclaration.apiItemMetadata = apiItemMetadata;\n }\n }\n\n private _parseTsdocForAstDeclaration(astDeclaration: AstDeclaration): tsdoc.ParserContext | undefined {\n const declaration: ts.Declaration = astDeclaration.declaration;\n let nodeForComment: ts.Node = declaration;\n\n if (ts.isVariableDeclaration(declaration)) {\n // Variable declarations are special because they can be combined into a list. For example:\n //\n // /** A */ export /** B */ const /** C */ x = 1, /** D **/ [ /** E */ y, z] = [3, 4];\n //\n // The compiler will only emit comments A and C in the .d.ts file, so in general there isn't a well-defined\n // way to document these parts. API Extractor requires you to break them into separate exports like this:\n //\n // /** A */ export const x = 1;\n //\n // But _getReleaseTagForDeclaration() still receives a node corresponding to \"x\", so we need to walk upwards\n // and find the containing statement in order for getJSDocCommentRanges() to read the comment that we expect.\n const statement: ts.VariableStatement | undefined = TypeScriptHelpers.findFirstParent(\n declaration,\n ts.SyntaxKind.VariableStatement\n ) as ts.VariableStatement | undefined;\n if (statement !== undefined) {\n // For a compound declaration, fall back to looking for C instead of A\n if (statement.declarationList.declarations.length === 1) {\n nodeForComment = statement;\n }\n }\n }\n\n const sourceFileText: string = declaration.getSourceFile().text;\n const ranges: ts.CommentRange[] =\n TypeScriptInternals.getJSDocCommentRanges(nodeForComment, sourceFileText) || [];\n\n if (ranges.length === 0) {\n return undefined;\n }\n\n // We use the JSDoc comment block that is closest to the definition, i.e.\n // the last one preceding it\n const range: ts.TextRange = ranges[ranges.length - 1];\n\n const tsdocTextRange: tsdoc.TextRange = tsdoc.TextRange.fromStringRange(\n sourceFileText,\n range.pos,\n range.end\n );\n\n const parserContext: tsdoc.ParserContext = this._tsdocParser.parseRange(tsdocTextRange);\n\n this.messageRouter.addTsdocMessages(parserContext, declaration.getSourceFile(), astDeclaration);\n\n // We delete the @privateRemarks block as early as possible, to ensure that it never leaks through\n // into one of the output files.\n parserContext.docComment.privateRemarks = undefined;\n\n return parserContext;\n }\n\n private _collectReferenceDirectives(astEntity: AstEntity): void {\n // Here, we're collecting reference directives from source files that contain extracted\n // definitions (i.e. - files that contain `export class ...`, `export interface ...`, ...).\n // These references may or may not include the `preserve=\"true\" attribute. In TS < 5.5,\n // references that end up in .D.TS files may or may not be explicity written by the developer.\n // In TS >= 5.5, only references that are explicitly authored and are marked with\n // `preserve=\"true\"` are included in the output. See https://github.com/microsoft/TypeScript/pull/57681\n //\n // The calls to `_collectReferenceDirectivesFromSourceFiles` in this function are\n // preserving existing behavior, which is to include all reference directives\n // regardless of whether they are explicitly authored or not, but only in files that\n // contain definitions.\n\n if (astEntity instanceof AstSymbol) {\n const sourceFiles: ts.SourceFile[] = astEntity.astDeclarations.map((astDeclaration) =>\n astDeclaration.declaration.getSourceFile()\n );\n return this._collectReferenceDirectivesFromSourceFiles(sourceFiles, false);\n }\n\n if (astEntity instanceof AstNamespaceImport) {\n const sourceFiles: ts.SourceFile[] = [astEntity.astModule.sourceFile];\n return this._collectReferenceDirectivesFromSourceFiles(sourceFiles, false);\n }\n }\n\n private _collectReferenceDirectivesFromSourceFiles(\n sourceFiles: Iterable<ts.SourceFile>,\n onlyIncludeExplicitlyPreserved: boolean\n ): void {\n const seenFilenames: Set<string> = new Set<string>();\n\n for (const sourceFile of sourceFiles) {\n if (sourceFile?.fileName) {\n const {\n fileName,\n typeReferenceDirectives,\n libReferenceDirectives,\n text: sourceFileText\n } = sourceFile;\n if (!seenFilenames.has(fileName)) {\n seenFilenames.add(fileName);\n\n for (const typeReferenceDirective of typeReferenceDirectives) {\n const name: string | undefined = this._getReferenceDirectiveFromSourceFile(\n sourceFileText,\n typeReferenceDirective,\n onlyIncludeExplicitlyPreserved\n );\n if (name) {\n this._dtsTypeReferenceDirectives.add(name);\n }\n }\n\n for (const libReferenceDirective of libReferenceDirectives) {\n const reference: string | undefined = this._getReferenceDirectiveFromSourceFile(\n sourceFileText,\n libReferenceDirective,\n onlyIncludeExplicitlyPreserved\n );\n if (reference) {\n this._dtsLibReferenceDirectives.add(reference);\n }\n }\n }\n }\n }\n }\n\n private _getReferenceDirectiveFromSourceFile(\n sourceFileText: string,\n { pos, end, preserve }: ts.FileReference,\n onlyIncludeExplicitlyPreserved: boolean\n ): string | undefined {\n const reference: string = sourceFileText.substring(pos, end);\n if (preserve || !onlyIncludeExplicitlyPreserved) {\n return reference;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"Collector.js","sourceRoot":"","sources":["../../src/collector/Collector.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,+CAAiC;AACjC,yCAAsC;AAEtC,wDAA0C;AAC1C,wEAA4D;AAC5D,oEAMsC;AAEtC,kEAA+D;AAC/D,uDAAoD;AACpD,+DAA4D;AAG5D,qDAAkD;AAElD,qEAAkE;AAClE,qDAAkD;AAClD,kEAA+D;AAC/D,+DAA8F;AAC9F,uDAAkF;AAClF,qDAAkD;AAClD,yEAAoG;AAEpG,2EAAwE;AACxE,4DAAyD;AACzD,uEAAoE;AACpE,qDAAkD;AAwBlD;;;;;GAKG;AACH,MAAa,SAAS;IA0CpB,YAAmB,OAA0B;QAf5B,cAAS,GAAsB,EAAE,CAAC;QAClC,yBAAoB,GAAoC,IAAI,GAAG,EAG7E,CAAC;QACa,s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SAAS,CAAC;QACnB,CAAC;IACH,CAAC;CACF;AAxgCD,8BAwgCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as ts from 'typescript';\nimport { minimatch } from 'minimatch';\n\nimport * as tsdoc from '@microsoft/tsdoc';\nimport { ReleaseTag } from '@microsoft/api-extractor-model';\nimport {\n PackageJsonLookup,\n Sort,\n InternalError,\n type INodePackageJson,\n PackageName\n} from '@rushstack/node-core-library';\n\nimport { ExtractorMessageId } from '../api/ExtractorMessageId';\nimport { CollectorEntity } from './CollectorEntity';\nimport { AstSymbolTable } from '../analyzer/AstSymbolTable';\nimport type { AstEntity } from '../analyzer/AstEntity';\nimport type { AstModule, IAstModuleExportInfo } from '../analyzer/AstModule';\nimport { AstSymbol } from '../analyzer/AstSymbol';\nimport type { AstDeclaration } from '../analyzer/AstDeclaration';\nimport { TypeScriptHelpers } from '../analyzer/TypeScriptHelpers';\nimport { WorkingPackage } from './WorkingPackage';\nimport { PackageDocComment } from '../aedoc/PackageDocComment';\nimport { type DeclarationMetadata, InternalDeclarationMetadata } from './DeclarationMetadata';\nimport { ApiItemMetadata, type IApiItemMetadataOptions } from './ApiItemMetadata';\nimport { SymbolMetadata } from './SymbolMetadata';\nimport { TypeScriptInternals, type IGlobalVariableAnalyzer } from '../analyzer/TypeScriptInternals';\nimport type { MessageRouter } from './MessageRouter';\nimport { AstReferenceResolver } from '../analyzer/AstReferenceResolver';\nimport { ExtractorConfig } from '../api/ExtractorConfig';\nimport { AstNamespaceImport } from '../analyzer/AstNamespaceImport';\nimport { AstImport } from '../analyzer/AstImport';\nimport type { SourceMapper } from './SourceMapper';\n\n/**\n * Options for Collector constructor.\n */\nexport interface ICollectorOptions {\n /**\n * Configuration for the TypeScript compiler. The most important options to set are:\n *\n * - target: ts.ScriptTarget.ES5\n * - module: ts.ModuleKind.CommonJS\n * - moduleResolution: ts.ModuleResolutionKind.NodeJs\n * - rootDir: inputFolder\n */\n program: ts.Program;\n\n messageRouter: MessageRouter;\n\n extractorConfig: ExtractorConfig;\n\n sourceMapper: SourceMapper;\n}\n\n/**\n * The `Collector` manages the overall data set that is used by `ApiModelGenerator`,\n * `DtsRollupGenerator`, and `ApiReportGenerator`. Starting from the working package's entry point,\n * the `Collector` collects all exported symbols, determines how to import any symbols they reference,\n * assigns unique names, and sorts everything into a normalized alphabetical ordering.\n */\nexport class Collector {\n public readonly program: ts.Program;\n public readonly typeChecker: ts.TypeChecker;\n public readonly globalVariableAnalyzer: IGlobalVariableAnalyzer;\n public readonly astSymbolTable: AstSymbolTable;\n public readonly astReferenceResolver: AstReferenceResolver;\n\n public readonly packageJsonLookup: PackageJsonLookup;\n public readonly messageRouter: MessageRouter;\n\n public readonly workingPackage: WorkingPackage;\n\n public readonly extractorConfig: ExtractorConfig;\n\n public readonly sourceMapper: SourceMapper;\n\n /**\n * The `ExtractorConfig.bundledPackages` names in a set.\n */\n public readonly bundledPackageNames: ReadonlySet<string>;\n\n private readonly _program: ts.Program;\n\n private readonly _tsdocParser: tsdoc.TSDocParser;\n\n private _astEntryPoint: AstModule | undefined;\n\n private readonly _entities: CollectorEntity[] = [];\n private readonly _entitiesByAstEntity: Map<AstEntity, CollectorEntity> = new Map<\n AstEntity,\n CollectorEntity\n >();\n private readonly _entitiesBySymbol: Map<ts.Symbol, CollectorEntity> = new Map<ts.Symbol, CollectorEntity>();\n\n private readonly _starExportedExternalModulePaths: string[] = [];\n\n private readonly _dtsTypeReferenceDirectives: Set<string> = new Set<string>();\n private readonly _dtsLibReferenceDirectives: Set<string> = new Set<string>();\n\n // Used by getOverloadIndex()\n private readonly _cachedOverloadIndexesByDeclaration: Map<AstDeclaration, number>;\n\n public constructor(options: ICollectorOptions) {\n this.packageJsonLookup = new PackageJsonLookup();\n\n this._program = options.program;\n this.extractorConfig = options.extractorConfig;\n this.sourceMapper = options.sourceMapper;\n\n const entryPointSourceFile: ts.SourceFile | undefined = options.program.getSourceFile(\n this.extractorConfig.mainEntryPointFilePath\n );\n\n if (!entryPointSourceFile) {\n throw new Error('Unable to load file: ' + this.extractorConfig.mainEntryPointFilePath);\n }\n\n if (!this.extractorConfig.packageFolder || !this.extractorConfig.packageJson) {\n // TODO: We should be able to analyze projects that don't have any package.json.\n // The ExtractorConfig class is already designed to allow this.\n throw new Error('Unable to find a package.json file for the project being analyzed');\n }\n\n this.workingPackage = new WorkingPackage({\n packageFolder: this.extractorConfig.packageFolder,\n packageJson: this.extractorConfig.packageJson,\n entryPointSourceFile\n });\n\n this.messageRouter = options.messageRouter;\n\n this.program = options.program;\n this.typeChecker = options.program.getTypeChecker();\n this.globalVariableAnalyzer = TypeScriptInternals.getGlobalVariableAnalyzer(this.program);\n\n this._tsdocParser = new tsdoc.TSDocParser(this.extractorConfig.tsdocConfiguration);\n\n // Resolve package name patterns and store concrete set of bundled package dependency names\n this.bundledPackageNames = Collector._resolveBundledPackagePatterns(\n this.extractorConfig.bundledPackages,\n this.extractorConfig.packageJson\n );\n\n this.astSymbolTable = new AstSymbolTable(\n this.program,\n this.typeChecker,\n this.packageJsonLookup,\n this.bundledPackageNames,\n this.messageRouter\n );\n this.astReferenceResolver = new AstReferenceResolver(this);\n\n this._cachedOverloadIndexesByDeclaration = new Map<AstDeclaration, number>();\n }\n\n /**\n * Resolve provided `bundledPackages` names and glob patterns to a list of explicit package names.\n *\n * @remarks\n * Explicit package names will be included in the output unconditionally. However, wildcard patterns will\n * only be matched against the various dependencies listed in the provided package.json (if there was one).\n * Patterns will be matched against `dependencies`, `devDependencies`, `optionalDependencies`, and `peerDependencies`.\n *\n * @param bundledPackages - The list of package names and/or glob patterns to resolve.\n * @param packageJson - The package.json of the package being processed (if there is one).\n * @returns The set of resolved package names to be bundled during analysis.\n */\n private static _resolveBundledPackagePatterns(\n bundledPackages: string[],\n packageJson: INodePackageJson | undefined\n ): ReadonlySet<string> {\n if (bundledPackages.length === 0) {\n // If no `bundledPackages` were specified, then there is nothing to resolve.\n // Return an empty set.\n return new Set<string>();\n }\n\n // Accumulate all declared dependencies.\n // Any wildcard patterns in `bundledPackages` will be resolved against these.\n const dependencyNames: Set<string> = new Set<string>();\n Object.keys(packageJson?.dependencies ?? {}).forEach((dep) => dependencyNames.add(dep));\n Object.keys(packageJson?.devDependencies ?? {}).forEach((dep) => dependencyNames.add(dep));\n Object.keys(packageJson?.peerDependencies ?? {}).forEach((dep) => dependencyNames.add(dep));\n Object.keys(packageJson?.optionalDependencies ?? {}).forEach((dep) => dependencyNames.add(dep));\n\n // The set of resolved package names to be populated and returned\n const resolvedPackageNames: Set<string> = new Set<string>();\n\n for (const packageNameOrPattern of bundledPackages) {\n // If the string is an exact package name, use it regardless of package.json contents\n if (PackageName.isValidName(packageNameOrPattern)) {\n resolvedPackageNames.add(packageNameOrPattern);\n } else {\n // If the entry isn't an exact package name, assume glob pattern and search for matches\n for (const dependencyName of dependencyNames) {\n if (minimatch(dependencyName, packageNameOrPattern)) {\n resolvedPackageNames.add(dependencyName);\n }\n }\n }\n }\n return resolvedPackageNames;\n }\n\n /**a\n * Returns a list of names (e.g. \"example-library\") that should appear in a reference like this:\n *\n * ```\n * /// <reference types=\"example-library\" />\n * ```\n */\n public get dtsTypeReferenceDirectives(): ReadonlySet<string> {\n return this._dtsTypeReferenceDirectives;\n }\n\n /**\n * A list of names (e.g. \"runtime-library\") that should appear in a reference like this:\n *\n * ```\n * /// <reference lib=\"runtime-library\" />\n * ```\n */\n public get dtsLibReferenceDirectives(): ReadonlySet<string> {\n return this._dtsLibReferenceDirectives;\n }\n\n public get entities(): ReadonlyArray<CollectorEntity> {\n return this._entities;\n }\n\n /**\n * A list of module specifiers (e.g. `\"@rushstack/node-core-library/lib/FileSystem\"`) that should be emitted\n * as star exports (e.g. `export * from \"@rushstack/node-core-library/lib/FileSystem\"`).\n */\n public get starExportedExternalModulePaths(): ReadonlyArray<string> {\n return this._starExportedExternalModulePaths;\n }\n\n /**\n * Perform the analysis.\n */\n public analyze(): void {\n if (this._astEntryPoint) {\n throw new Error('DtsRollupGenerator.analyze() was already called');\n }\n\n // This runs a full type analysis, and then augments the Abstract Syntax Tree (i.e. declarations)\n // with semantic information (i.e. symbols). The \"diagnostics\" are a subset of the everyday\n // compile errors that would result from a full compilation.\n for (const diagnostic of this._program.getSemanticDiagnostics()) {\n this.messageRouter.addCompilerDiagnostic(diagnostic);\n }\n\n const sourceFiles: readonly ts.SourceFile[] = this.program.getSourceFiles();\n\n if (this.messageRouter.showDiagnostics) {\n this.messageRouter.logDiagnosticHeader('Root filenames');\n for (const fileName of this.program.getRootFileNames()) {\n this.messageRouter.logDiagnostic(fileName);\n }\n this.messageRouter.logDiagnosticFooter();\n\n this.messageRouter.logDiagnosticHeader('Files analyzed by compiler');\n for (const sourceFile of sourceFiles) {\n this.messageRouter.logDiagnostic(sourceFile.fileName);\n }\n this.messageRouter.logDiagnosticFooter();\n }\n\n // We can throw this error earlier in CompilerState.ts, but intentionally wait until after we've logged the\n // associated diagnostic message above to make debugging easier for developers.\n // Typically there will be many such files -- to avoid too much noise, only report the first one.\n const badSourceFile: ts.SourceFile | undefined = sourceFiles.find(\n ({ fileName }) => !ExtractorConfig.hasDtsFileExtension(fileName)\n );\n if (badSourceFile) {\n this.messageRouter.addAnalyzerIssueForPosition(\n ExtractorMessageId.WrongInputFileType,\n 'Incorrect file type; API Extractor expects to analyze compiler outputs with the .d.ts file extension. ' +\n 'Troubleshooting tips: https://api-extractor.com/link/dts-error',\n badSourceFile,\n 0\n );\n }\n\n // Build the entry point\n const entryPointSourceFile: ts.SourceFile = this.workingPackage.entryPointSourceFile;\n\n const astEntryPoint: AstModule =\n this.astSymbolTable.fetchAstModuleFromWorkingPackage(entryPointSourceFile);\n this._astEntryPoint = astEntryPoint;\n\n const packageDocCommentTextRange: ts.TextRange | undefined = PackageDocComment.tryFindInSourceFile(\n entryPointSourceFile,\n this\n );\n\n if (packageDocCommentTextRange) {\n const range: tsdoc.TextRange = tsdoc.TextRange.fromStringRange(\n entryPointSourceFile.text,\n packageDocCommentTextRange.pos,\n packageDocCommentTextRange.end\n );\n\n this.workingPackage.tsdocParserContext = this._tsdocParser.parseRange(range);\n\n this.messageRouter.addTsdocMessages(this.workingPackage.tsdocParserContext, entryPointSourceFile);\n\n this.workingPackage.tsdocComment = this.workingPackage.tsdocParserContext!.docComment;\n }\n\n const { exportedLocalEntities, starExportedExternalModules, visitedAstModules }: IAstModuleExportInfo =\n this.astSymbolTable.fetchAstModuleExportInfo(astEntryPoint);\n\n // Create a CollectorEntity for each top-level export.\n const processedAstEntities: AstEntity[] = [];\n for (const [exportName, astEntity] of exportedLocalEntities) {\n this._createCollectorEntity(astEntity, exportName);\n processedAstEntities.push(astEntity);\n }\n\n // Recursively create the remaining CollectorEntities after the top-level entities\n // have been processed.\n const alreadySeenAstEntities: Set<AstEntity> = new Set<AstEntity>();\n for (const astEntity of processedAstEntities) {\n this._recursivelyCreateEntities(astEntity, alreadySeenAstEntities);\n if (astEntity instanceof AstSymbol) {\n this.fetchSymbolMetadata(astEntity);\n }\n }\n\n // Ensure references are collected from any intermediate files that\n // only include exports\n const nonExternalSourceFiles: Set<ts.SourceFile> = new Set();\n for (const { sourceFile, isExternal } of visitedAstModules) {\n if (!nonExternalSourceFiles.has(sourceFile) && !isExternal) {\n nonExternalSourceFiles.add(sourceFile);\n }\n }\n\n // Here, we're collecting reference directives from all non-external source files\n // that were encountered while looking for exports, but only those references that\n // were explicitly written by the developer and marked with the `preserve=\"true\"`\n // attribute. In TS >= 5.5, only references that are explicitly authored and marked\n // with `preserve=\"true\"` are included in the output. See https://github.com/microsoft/TypeScript/pull/57681\n //\n // The `_collectReferenceDirectives` function pulls in all references in files that\n // contain definitions, but does not examine files that only reexport from other\n // files. Here, we're looking through files that were missed by `_collectReferenceDirectives`,\n // but only collecting references that were explicitly marked with `preserve=\"true\"`.\n // It is intuitive for developers to include references that they explicitly want part of\n // their public API in a file like the entrypoint, which is likely to only contain reexports,\n // and this picks those up.\n this._collectReferenceDirectivesFromSourceFiles(nonExternalSourceFiles, true);\n\n this._makeUniqueNames();\n\n for (const starExportedExternalModule of starExportedExternalModules) {\n if (starExportedExternalModule.externalModulePath !== undefined) {\n this._starExportedExternalModulePaths.push(starExportedExternalModule.externalModulePath);\n }\n }\n\n Sort.sortBy(this._entities, (x) => x.getSortKey());\n Sort.sortSet(this._dtsTypeReferenceDirectives);\n Sort.sortSet(this._dtsLibReferenceDirectives);\n this._starExportedExternalModulePaths.sort();\n }\n\n /**\n * For a given ts.Identifier that is part of an AstSymbol that we analyzed, return the CollectorEntity that\n * it refers to. Returns undefined if it doesn't refer to anything interesting.\n * @remarks\n * Throws an Error if the ts.Identifier is not part of node tree that was analyzed.\n */\n public tryGetEntityForNode(identifier: ts.Identifier | ts.ImportTypeNode): CollectorEntity | undefined {\n const astEntity: AstEntity | undefined = this.astSymbolTable.tryGetEntityForNode(identifier);\n if (astEntity) {\n return this._entitiesByAstEntity.get(astEntity);\n }\n return undefined;\n }\n\n /**\n * For a given analyzed ts.Symbol, return the CollectorEntity that it refers to. Returns undefined if it\n * doesn't refer to anything interesting.\n */\n public tryGetEntityForSymbol(symbol: ts.Symbol): CollectorEntity | undefined {\n return this._entitiesBySymbol.get(symbol);\n }\n\n /**\n * Returns the associated `CollectorEntity` for the given `astEntity`, if one was created during analysis.\n */\n public tryGetCollectorEntity(astEntity: AstEntity): CollectorEntity | undefined {\n return this._entitiesByAstEntity.get(astEntity);\n }\n\n public fetchSymbolMetadata(astSymbol: AstSymbol): SymbolMetadata {\n if (astSymbol.symbolMetadata === undefined) {\n this._fetchSymbolMetadata(astSymbol);\n }\n return astSymbol.symbolMetadata as SymbolMetadata;\n }\n\n public fetchDeclarationMetadata(astDeclaration: AstDeclaration): DeclarationMetadata {\n if (astDeclaration.declarationMetadata === undefined) {\n // Fetching the SymbolMetadata always constructs the DeclarationMetadata\n this._fetchSymbolMetadata(astDeclaration.astSymbol);\n }\n return astDeclaration.declarationMetadata as DeclarationMetadata;\n }\n\n public fetchApiItemMetadata(astDeclaration: AstDeclaration): ApiItemMetadata {\n if (astDeclaration.apiItemMetadata === undefined) {\n // Fetching the SymbolMetadata always constructs the ApiItemMetadata\n this._fetchSymbolMetadata(astDeclaration.astSymbol);\n }\n return astDeclaration.apiItemMetadata as ApiItemMetadata;\n }\n\n public tryFetchMetadataForAstEntity(astEntity: AstEntity): SymbolMetadata | undefined {\n if (astEntity instanceof AstSymbol) {\n return this.fetchSymbolMetadata(astEntity);\n }\n if (astEntity instanceof AstImport) {\n if (astEntity.astSymbol) {\n return this.fetchSymbolMetadata(astEntity.astSymbol);\n }\n }\n return undefined;\n }\n\n public isAncillaryDeclaration(astDeclaration: AstDeclaration): boolean {\n const declarationMetadata: DeclarationMetadata = this.fetchDeclarationMetadata(astDeclaration);\n return declarationMetadata.isAncillary;\n }\n\n public getNonAncillaryDeclarations(astSymbol: AstSymbol): ReadonlyArray<AstDeclaration> {\n const result: AstDeclaration[] = [];\n for (const astDeclaration of astSymbol.astDeclarations) {\n const declarationMetadata: DeclarationMetadata = this.fetchDeclarationMetadata(astDeclaration);\n if (!declarationMetadata.isAncillary) {\n result.push(astDeclaration);\n }\n }\n return result;\n }\n\n /**\n * Removes the leading underscore, for example: \"_Example\" --> \"example*Example*_\"\n *\n * @remarks\n * This causes internal definitions to sort alphabetically case-insensitive, then case-sensitive, and\n * initially ignoring the underscore prefix, while still deterministically comparing it.\n * The star is used as a delimiter because it is not a legal identifier character.\n */\n public static getSortKeyIgnoringUnderscore(identifier: string | undefined): string {\n if (!identifier) return '';\n\n let parts: string[];\n\n if (identifier[0] === '_') {\n const withoutUnderscore: string = identifier.substr(1);\n parts = [withoutUnderscore.toLowerCase(), '*', withoutUnderscore, '*', '_'];\n } else {\n parts = [identifier.toLowerCase(), '*', identifier];\n }\n\n return parts.join('');\n }\n\n /**\n * For function-like signatures, this returns the TSDoc \"overload index\" which can be used to identify\n * a specific overload.\n */\n public getOverloadIndex(astDeclaration: AstDeclaration): number {\n const allDeclarations: ReadonlyArray<AstDeclaration> = astDeclaration.astSymbol.astDeclarations;\n if (allDeclarations.length === 1) {\n return 1; // trivial case\n }\n\n let overloadIndex: number | undefined = this._cachedOverloadIndexesByDeclaration.get(astDeclaration);\n\n if (overloadIndex === undefined) {\n // TSDoc index selectors are positive integers counting from 1\n let nextIndex: number = 1;\n for (const other of allDeclarations) {\n // Filter out other declarations that are not overloads. For example, an overloaded function can also\n // be a namespace.\n if (other.declaration.kind === astDeclaration.declaration.kind) {\n this._cachedOverloadIndexesByDeclaration.set(other, nextIndex);\n ++nextIndex;\n }\n }\n overloadIndex = this._cachedOverloadIndexesByDeclaration.get(astDeclaration);\n }\n\n if (overloadIndex === undefined) {\n // This should never happen\n throw new InternalError('Error calculating overload index for declaration');\n }\n\n return overloadIndex;\n }\n\n private _createCollectorEntity(\n astEntity: AstEntity,\n exportName?: string,\n parent?: CollectorEntity\n ): CollectorEntity {\n let entity: CollectorEntity | undefined = this._entitiesByAstEntity.get(astEntity);\n\n if (!entity) {\n entity = new CollectorEntity(astEntity);\n\n this._entitiesByAstEntity.set(astEntity, entity);\n if (astEntity instanceof AstSymbol) {\n this._entitiesBySymbol.set(astEntity.followedSymbol, entity);\n } else if (astEntity instanceof AstNamespaceImport) {\n this._entitiesBySymbol.set(astEntity.symbol, entity);\n }\n this._entities.push(entity);\n this._collectReferenceDirectives(astEntity);\n }\n\n if (exportName) {\n if (parent) {\n entity.addLocalExportName(exportName, parent);\n } else {\n entity.addExportName(exportName);\n }\n }\n\n return entity;\n }\n\n private _recursivelyCreateEntities(astEntity: AstEntity, alreadySeenAstEntities: Set<AstEntity>): void {\n if (alreadySeenAstEntities.has(astEntity)) return;\n alreadySeenAstEntities.add(astEntity);\n\n if (astEntity instanceof AstSymbol) {\n astEntity.forEachDeclarationRecursive((astDeclaration: AstDeclaration) => {\n for (const referencedAstEntity of astDeclaration.referencedAstEntities) {\n if (referencedAstEntity instanceof AstSymbol) {\n // We only create collector entities for root-level symbols. For example, if a symbol is\n // nested inside a namespace, only the namespace gets a collector entity. Note that this\n // is not true for AstNamespaceImports below.\n if (referencedAstEntity.parentAstSymbol === undefined) {\n this._createCollectorEntity(referencedAstEntity);\n }\n } else {\n this._createCollectorEntity(referencedAstEntity);\n }\n\n this._recursivelyCreateEntities(referencedAstEntity, alreadySeenAstEntities);\n }\n });\n }\n\n if (astEntity instanceof AstNamespaceImport) {\n const astModuleExportInfo: IAstModuleExportInfo = astEntity.fetchAstModuleExportInfo(this);\n const parentEntity: CollectorEntity | undefined = this._entitiesByAstEntity.get(astEntity);\n if (!parentEntity) {\n // This should never happen, as we've already created entities for all AstNamespaceImports.\n throw new InternalError(\n `Failed to get CollectorEntity for AstNamespaceImport with namespace name \"${astEntity.namespaceName}\"`\n );\n }\n\n for (const [localExportName, localAstEntity] of astModuleExportInfo.exportedLocalEntities) {\n // Create a CollectorEntity for each local export within an AstNamespaceImport entity.\n this._createCollectorEntity(localAstEntity, localExportName, parentEntity);\n this._recursivelyCreateEntities(localAstEntity, alreadySeenAstEntities);\n }\n }\n }\n\n /**\n * Ensures a unique name for each item in the package typings file.\n */\n private _makeUniqueNames(): void {\n // The following examples illustrate the nameForEmit heuristics:\n //\n // Example 1:\n // class X { } <--- nameForEmit should be \"A\" to simplify things and reduce possibility of conflicts\n // export { X as A };\n //\n // Example 2:\n // class X { } <--- nameForEmit should be \"X\" because choosing A or B would be nondeterministic\n // export { X as A };\n // export { X as B };\n //\n // Example 3:\n // class X { } <--- nameForEmit should be \"X_1\" because Y has a stronger claim to the name\n // export { X as A };\n // export { X as B };\n // class Y { } <--- nameForEmit should be \"X\"\n // export { Y as X };\n\n // Set of names that should NOT be used when generating a unique nameForEmit\n const usedNames: Set<string> = new Set<string>();\n\n // First collect the names of explicit package exports, and perform a sanity check.\n for (const entity of this._entities) {\n for (const exportName of entity.exportNames) {\n if (usedNames.has(exportName)) {\n // This should be impossible\n throw new InternalError(`A package cannot have two exports with the name \"${exportName}\"`);\n }\n usedNames.add(exportName);\n }\n }\n\n // Ensure that each entity has a unique nameForEmit\n for (const entity of this._entities) {\n // What name would we ideally want to emit it as?\n let idealNameForEmit: string;\n\n // If this entity is exported exactly once, then we prefer the exported name\n if (\n entity.singleExportName !== undefined &&\n entity.singleExportName !== ts.InternalSymbolName.Default\n ) {\n idealNameForEmit = entity.singleExportName;\n } else {\n // otherwise use the local name\n idealNameForEmit = entity.astEntity.localName;\n }\n\n if (idealNameForEmit.includes('.')) {\n // For an ImportType with a namespace chain, only the top namespace is imported.\n idealNameForEmit = idealNameForEmit.split('.')[0];\n }\n\n // If the idealNameForEmit happens to be the same as one of the exports, then we're safe to use that...\n if (entity.exportNames.has(idealNameForEmit)) {\n // ...except that if it conflicts with a global name, then the global name wins\n if (!this.globalVariableAnalyzer.hasGlobalName(idealNameForEmit)) {\n // ...also avoid \"default\" which can interfere with \"export { default } from 'some-module;'\"\n if (idealNameForEmit !== 'default') {\n entity.nameForEmit = idealNameForEmit;\n continue;\n }\n }\n }\n\n // Generate a unique name based on idealNameForEmit\n let suffix: number = 1;\n let nameForEmit: string = idealNameForEmit;\n\n // Choose a name that doesn't conflict with usedNames or a global name\n while (\n nameForEmit === 'default' ||\n usedNames.has(nameForEmit) ||\n this.globalVariableAnalyzer.hasGlobalName(nameForEmit)\n ) {\n nameForEmit = `${idealNameForEmit}_${++suffix}`;\n }\n entity.nameForEmit = nameForEmit;\n usedNames.add(nameForEmit);\n }\n }\n\n private _fetchSymbolMetadata(astSymbol: AstSymbol): void {\n if (astSymbol.symbolMetadata) {\n return;\n }\n\n // When we solve an astSymbol, then we always also solve all of its parents and all of its declarations.\n // The parent is solved first.\n if (astSymbol.parentAstSymbol && astSymbol.parentAstSymbol.symbolMetadata === undefined) {\n this._fetchSymbolMetadata(astSymbol.parentAstSymbol);\n }\n\n // Construct the DeclarationMetadata objects, and detect any ancillary declarations\n this._calculateDeclarationMetadataForDeclarations(astSymbol);\n\n // Calculate the ApiItemMetadata objects\n for (const astDeclaration of astSymbol.astDeclarations) {\n this._calculateApiItemMetadata(astDeclaration);\n }\n\n // The most public effectiveReleaseTag for all declarations\n let maxEffectiveReleaseTag: ReleaseTag = ReleaseTag.None;\n\n for (const astDeclaration of astSymbol.astDeclarations) {\n // We know we solved this above\n const apiItemMetadata: ApiItemMetadata = astDeclaration.apiItemMetadata as ApiItemMetadata;\n\n const effectiveReleaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n\n if (effectiveReleaseTag > maxEffectiveReleaseTag) {\n maxEffectiveReleaseTag = effectiveReleaseTag;\n }\n }\n\n // Update this last when we're sure no exceptions were thrown\n astSymbol.symbolMetadata = new SymbolMetadata({\n maxEffectiveReleaseTag\n });\n }\n\n private _calculateDeclarationMetadataForDeclarations(astSymbol: AstSymbol): void {\n // Initialize DeclarationMetadata for each declaration\n for (const astDeclaration of astSymbol.astDeclarations) {\n if (astDeclaration.declarationMetadata) {\n throw new InternalError(\n 'AstDeclaration.declarationMetadata is not expected to have been initialized yet'\n );\n }\n\n const metadata: InternalDeclarationMetadata = new InternalDeclarationMetadata();\n metadata.tsdocParserContext = this._parseTsdocForAstDeclaration(astDeclaration);\n\n astDeclaration.declarationMetadata = metadata;\n }\n\n // Detect ancillary declarations\n for (const astDeclaration of astSymbol.astDeclarations) {\n // For a getter/setter pair, make the setter ancillary to the getter\n if (astDeclaration.declaration.kind === ts.SyntaxKind.SetAccessor) {\n let foundGetter: boolean = false;\n for (const getterAstDeclaration of astDeclaration.astSymbol.astDeclarations) {\n if (getterAstDeclaration.declaration.kind === ts.SyntaxKind.GetAccessor) {\n // Associate it with the getter\n this._addAncillaryDeclaration(getterAstDeclaration, astDeclaration);\n\n foundGetter = true;\n }\n }\n\n if (!foundGetter) {\n this.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.MissingGetter,\n `The property \"${astDeclaration.astSymbol.localName}\" has a setter but no getter.`,\n astDeclaration\n );\n }\n }\n }\n }\n\n private _addAncillaryDeclaration(\n mainAstDeclaration: AstDeclaration,\n ancillaryAstDeclaration: AstDeclaration\n ): void {\n const mainMetadata: InternalDeclarationMetadata =\n mainAstDeclaration.declarationMetadata as InternalDeclarationMetadata;\n const ancillaryMetadata: InternalDeclarationMetadata =\n ancillaryAstDeclaration.declarationMetadata as InternalDeclarationMetadata;\n\n if (mainMetadata.ancillaryDeclarations.indexOf(ancillaryAstDeclaration) >= 0) {\n return; // already added\n }\n\n if (mainAstDeclaration.astSymbol !== ancillaryAstDeclaration.astSymbol) {\n throw new InternalError(\n 'Invalid call to _addAncillaryDeclaration() because declarations do not' +\n ' belong to the same symbol'\n );\n }\n\n if (mainMetadata.isAncillary) {\n throw new InternalError(\n 'Invalid call to _addAncillaryDeclaration() because the target is ancillary itself'\n );\n }\n\n if (ancillaryMetadata.isAncillary) {\n throw new InternalError(\n 'Invalid call to _addAncillaryDeclaration() because source is already ancillary' +\n ' to another declaration'\n );\n }\n\n if (mainAstDeclaration.apiItemMetadata || ancillaryAstDeclaration.apiItemMetadata) {\n throw new InternalError(\n 'Invalid call to _addAncillaryDeclaration() because the API item metadata' +\n ' has already been constructed'\n );\n }\n\n ancillaryMetadata.isAncillary = true;\n mainMetadata.ancillaryDeclarations.push(ancillaryAstDeclaration);\n }\n\n private _calculateApiItemMetadata(astDeclaration: AstDeclaration): void {\n const declarationMetadata: InternalDeclarationMetadata =\n astDeclaration.declarationMetadata as InternalDeclarationMetadata;\n if (declarationMetadata.isAncillary) {\n if (astDeclaration.declaration.kind === ts.SyntaxKind.SetAccessor) {\n if (declarationMetadata.tsdocParserContext) {\n this.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.SetterWithDocs,\n `The doc comment for the property \"${astDeclaration.astSymbol.localName}\"` +\n ` must appear on the getter, not the setter.`,\n astDeclaration\n );\n }\n }\n\n // We never calculate ApiItemMetadata for an ancillary declaration; instead, it is assigned when\n // the main declaration is processed.\n return;\n }\n\n const options: IApiItemMetadataOptions = {\n declaredReleaseTag: ReleaseTag.None,\n effectiveReleaseTag: ReleaseTag.None,\n isEventProperty: false,\n isOverride: false,\n isSealed: false,\n isVirtual: false,\n isPreapproved: false,\n releaseTagSameAsParent: false\n };\n\n const parserContext: tsdoc.ParserContext | undefined = declarationMetadata.tsdocParserContext;\n if (parserContext) {\n const modifierTagSet: tsdoc.StandardModifierTagSet = parserContext.docComment.modifierTagSet;\n\n let declaredReleaseTag: ReleaseTag = ReleaseTag.None;\n let extraReleaseTags: boolean = false;\n\n if (modifierTagSet.isPublic()) {\n declaredReleaseTag = ReleaseTag.Public;\n }\n if (modifierTagSet.isBeta()) {\n if (declaredReleaseTag !== ReleaseTag.None) {\n extraReleaseTags = true;\n } else {\n declaredReleaseTag = ReleaseTag.Beta;\n }\n }\n if (modifierTagSet.isAlpha()) {\n if (declaredReleaseTag !== ReleaseTag.None) {\n extraReleaseTags = true;\n } else {\n declaredReleaseTag = ReleaseTag.Alpha;\n }\n }\n if (modifierTagSet.isInternal()) {\n if (declaredReleaseTag !== ReleaseTag.None) {\n extraReleaseTags = true;\n } else {\n declaredReleaseTag = ReleaseTag.Internal;\n }\n }\n\n if (extraReleaseTags) {\n if (!astDeclaration.astSymbol.isExternal) {\n // for now, don't report errors for external code\n this.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.ExtraReleaseTag,\n 'The doc comment should not contain more than one release tag',\n astDeclaration\n );\n }\n }\n\n options.declaredReleaseTag = declaredReleaseTag;\n\n options.isEventProperty = modifierTagSet.isEventProperty();\n options.isOverride = modifierTagSet.isOverride();\n options.isSealed = modifierTagSet.isSealed();\n options.isVirtual = modifierTagSet.isVirtual();\n const preapprovedTag: tsdoc.TSDocTagDefinition | void =\n this.extractorConfig.tsdocConfiguration.tryGetTagDefinition('@preapproved');\n\n if (preapprovedTag && modifierTagSet.hasTag(preapprovedTag)) {\n // This feature only makes sense for potentially big declarations.\n switch (astDeclaration.declaration.kind) {\n case ts.SyntaxKind.ClassDeclaration:\n case ts.SyntaxKind.EnumDeclaration:\n case ts.SyntaxKind.InterfaceDeclaration:\n case ts.SyntaxKind.ModuleDeclaration:\n if (declaredReleaseTag === ReleaseTag.Internal) {\n options.isPreapproved = true;\n } else {\n this.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.PreapprovedBadReleaseTag,\n `The @preapproved tag cannot be applied to \"${astDeclaration.astSymbol.localName}\"` +\n ` without an @internal release tag`,\n astDeclaration\n );\n }\n break;\n default:\n this.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.PreapprovedUnsupportedType,\n `The @preapproved tag cannot be applied to \"${astDeclaration.astSymbol.localName}\"` +\n ` because it is not a supported declaration type`,\n astDeclaration\n );\n break;\n }\n }\n }\n\n // This needs to be set regardless of whether or not a parserContext exists\n if (astDeclaration.parent) {\n const parentApiItemMetadata: ApiItemMetadata = this.fetchApiItemMetadata(astDeclaration.parent);\n options.effectiveReleaseTag =\n options.declaredReleaseTag === ReleaseTag.None\n ? parentApiItemMetadata.effectiveReleaseTag\n : options.declaredReleaseTag;\n\n options.releaseTagSameAsParent =\n parentApiItemMetadata.effectiveReleaseTag === options.effectiveReleaseTag;\n } else {\n options.effectiveReleaseTag = options.declaredReleaseTag;\n }\n\n if (options.effectiveReleaseTag === ReleaseTag.None) {\n if (!astDeclaration.astSymbol.isExternal) {\n // for now, don't report errors for external code\n // Don't report missing release tags for forgotten exports (unless we're including forgotten exports\n // in either the API report or doc model).\n const astSymbol: AstSymbol = astDeclaration.astSymbol;\n const entity: CollectorEntity | undefined = this._entitiesByAstEntity.get(astSymbol.rootAstSymbol);\n if (\n entity &&\n (entity.consumable ||\n this.extractorConfig.apiReportIncludeForgottenExports ||\n this.extractorConfig.docModelIncludeForgottenExports)\n ) {\n // We also don't report errors for the default export of an entry point, since its doc comment\n // isn't easy to obtain from the .d.ts file\n if (astSymbol.rootAstSymbol.localName !== '_default') {\n this.messageRouter.addAnalyzerIssue(\n ExtractorMessageId.MissingReleaseTag,\n `\"${entity.astEntity.localName}\" is part of the package's API, but it is missing ` +\n `a release tag (@alpha, @beta, @public, or @internal)`,\n astSymbol\n );\n }\n }\n }\n\n options.effectiveReleaseTag = ReleaseTag.Public;\n }\n\n const apiItemMetadata: ApiItemMetadata = new ApiItemMetadata(options);\n if (parserContext) {\n apiItemMetadata.tsdocComment = parserContext.docComment;\n }\n\n astDeclaration.apiItemMetadata = apiItemMetadata;\n\n // Lastly, share the result with any ancillary declarations\n for (const ancillaryDeclaration of declarationMetadata.ancillaryDeclarations) {\n ancillaryDeclaration.apiItemMetadata = apiItemMetadata;\n }\n }\n\n private _parseTsdocForAstDeclaration(astDeclaration: AstDeclaration): tsdoc.ParserContext | undefined {\n const declaration: ts.Declaration = astDeclaration.declaration;\n let nodeForComment: ts.Node = declaration;\n\n if (ts.isVariableDeclaration(declaration)) {\n // Variable declarations are special because they can be combined into a list. For example:\n //\n // /** A */ export /** B */ const /** C */ x = 1, /** D **/ [ /** E */ y, z] = [3, 4];\n //\n // The compiler will only emit comments A and C in the .d.ts file, so in general there isn't a well-defined\n // way to document these parts. API Extractor requires you to break them into separate exports like this:\n //\n // /** A */ export const x = 1;\n //\n // But _getReleaseTagForDeclaration() still receives a node corresponding to \"x\", so we need to walk upwards\n // and find the containing statement in order for getJSDocCommentRanges() to read the comment that we expect.\n const statement: ts.VariableStatement | undefined = TypeScriptHelpers.findFirstParent(\n declaration,\n ts.SyntaxKind.VariableStatement\n ) as ts.VariableStatement | undefined;\n if (statement !== undefined) {\n // For a compound declaration, fall back to looking for C instead of A\n if (statement.declarationList.declarations.length === 1) {\n nodeForComment = statement;\n }\n }\n }\n\n const sourceFileText: string = declaration.getSourceFile().text;\n const ranges: ts.CommentRange[] =\n TypeScriptInternals.getJSDocCommentRanges(nodeForComment, sourceFileText) || [];\n\n if (ranges.length === 0) {\n return undefined;\n }\n\n // We use the JSDoc comment block that is closest to the definition, i.e.\n // the last one preceding it\n const range: ts.TextRange = ranges[ranges.length - 1];\n\n const tsdocTextRange: tsdoc.TextRange = tsdoc.TextRange.fromStringRange(\n sourceFileText,\n range.pos,\n range.end\n );\n\n const parserContext: tsdoc.ParserContext = this._tsdocParser.parseRange(tsdocTextRange);\n\n this.messageRouter.addTsdocMessages(parserContext, declaration.getSourceFile(), astDeclaration);\n\n // We delete the @privateRemarks block as early as possible, to ensure that it never leaks through\n // into one of the output files.\n parserContext.docComment.privateRemarks = undefined;\n\n return parserContext;\n }\n\n private _collectReferenceDirectives(astEntity: AstEntity): void {\n // Here, we're collecting reference directives from source files that contain extracted\n // definitions (i.e. - files that contain `export class ...`, `export interface ...`, ...).\n // These references may or may not include the `preserve=\"true\" attribute. In TS < 5.5,\n // references that end up in .D.TS files may or may not be explicity written by the developer.\n // In TS >= 5.5, only references that are explicitly authored and are marked with\n // `preserve=\"true\"` are included in the output. See https://github.com/microsoft/TypeScript/pull/57681\n //\n // The calls to `_collectReferenceDirectivesFromSourceFiles` in this function are\n // preserving existing behavior, which is to include all reference directives\n // regardless of whether they are explicitly authored or not, but only in files that\n // contain definitions.\n\n if (astEntity instanceof AstSymbol) {\n const sourceFiles: ts.SourceFile[] = astEntity.astDeclarations.map((astDeclaration) =>\n astDeclaration.declaration.getSourceFile()\n );\n return this._collectReferenceDirectivesFromSourceFiles(sourceFiles, false);\n }\n\n if (astEntity instanceof AstNamespaceImport) {\n const sourceFiles: ts.SourceFile[] = [astEntity.astModule.sourceFile];\n return this._collectReferenceDirectivesFromSourceFiles(sourceFiles, false);\n }\n }\n\n private _collectReferenceDirectivesFromSourceFiles(\n sourceFiles: Iterable<ts.SourceFile>,\n onlyIncludeExplicitlyPreserved: boolean\n ): void {\n const seenFilenames: Set<string> = new Set<string>();\n\n for (const sourceFile of sourceFiles) {\n if (sourceFile?.fileName) {\n const {\n fileName,\n typeReferenceDirectives,\n libReferenceDirectives,\n text: sourceFileText\n } = sourceFile;\n if (!seenFilenames.has(fileName)) {\n seenFilenames.add(fileName);\n\n for (const typeReferenceDirective of typeReferenceDirectives) {\n const name: string | undefined = this._getReferenceDirectiveFromSourceFile(\n sourceFileText,\n typeReferenceDirective,\n onlyIncludeExplicitlyPreserved\n );\n if (name) {\n this._dtsTypeReferenceDirectives.add(name);\n }\n }\n\n for (const libReferenceDirective of libReferenceDirectives) {\n const reference: string | undefined = this._getReferenceDirectiveFromSourceFile(\n sourceFileText,\n libReferenceDirective,\n onlyIncludeExplicitlyPreserved\n );\n if (reference) {\n this._dtsLibReferenceDirectives.add(reference);\n }\n }\n }\n }\n }\n }\n\n private _getReferenceDirectiveFromSourceFile(\n sourceFileText: string,\n { pos, end, preserve }: ts.FileReference,\n onlyIncludeExplicitlyPreserved: boolean\n ): string | undefined {\n const reference: string = sourceFileText.substring(pos, end);\n if (preserve || !onlyIncludeExplicitlyPreserved) {\n return reference;\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CollectorEntity.d.ts","sourceRoot":"","sources":["../../src/collector/CollectorEntity.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD;;;;;;;;GAQG;AACH,qBAAa,eAAe;IAC1B;;OAEG;IACH,SAAgB,SAAS,EAAE,SAAS,CAAC;IAErC,OAAO,CAAC,YAAY,CAA0B;IAC9C,OAAO,CAAC,kBAAkB,CAAkB;IAC5C,OAAO,CAAC,iBAAiB,CAAiC;IAC1D,OAAO,CAAC,yBAAyB,CAAgD;IAEjF,OAAO,CAAC,YAAY,CAAiC;IAErD,OAAO,CAAC,QAAQ,CAAiC;gBAE9B,SAAS,EAAE,SAAS;IAIvC;;;;OAIG;IACH,IAAW,WAAW,IAAI,MAAM,GAAG,SAAS,CAE3C;IAED,IAAW,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAG/C;IAED;;;;;;;;;;OAUG;IACH,IAAW,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,CAM5C;IAED;;;OAGG;IACH,IAAW,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAEhD;IAED;;;OAGG;IACH,IAAW,kBAAkB,IAAI,OAAO,CAiBvC;IAED;;OAEG;IACH,IAAW,sBAAs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AAsB,IAAI,OAAO,CAE3C;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAW,QAAQ,IAAI,OAAO,CAY7B;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,IAAW,UAAU,IAAI,OAAO,CAY/B;IAED;;;OAGG;IACI,iCAAiC,IAAI,eAAe,GAAG,SAAS;IASvE;;OAEG;IACI,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAa9C;;;;;;;;;;;;;;;;OAgBG;IACI,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI;IAOjF;;OAEG;IACI,UAAU,IAAI,MAAM;CAM5B"}
@@ -37,9 +37,9 @@ var __importStar = (this && this.__importStar) || (function () {
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
38
  exports.CollectorEntity = void 0;
39
39
  const ts = __importStar(require("typescript"));
40
+ const node_core_library_1 = require("@rushstack/node-core-library");
40
41
  const AstSymbol_1 = require("../analyzer/AstSymbol");
41
42
  const Collector_1 = require("./Collector");
42
- const node_core_library_1 = require("@rushstack/node-core-library");
43
43
  const AstNamespaceExport_1 = require("../analyzer/AstNamespaceExport");
44
44
  /**
45
45
  * This is a data structure used by the Collector to track an AstEntity that may be emitted in the *.d.ts file.