@microsoft/api-extractor 7.52.3 → 7.52.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SourceMapper.js","sourceRoot":"","sources":["../../src/collector/SourceMapper.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,2CAA6B;AAC7B,2CAAmG;AACnG,oEAAgG;AA4DhG,MAAa,YAAY;IAAzB;QACE,0FAA0F;QAClF,yBAAoB,GAAmC,IAAI,GAAG,EAA6B,CAAC;QAEpG,4DAA4D;QACpD,4BAAuB,GAAmC,IAAI,GAAG,EAA6B,CAAC;IAkMzG,CAAC;IAhMC;;;OAGG;IACI,iBAAiB,CAAC,OAAkC;QACzD,MAAM,gBAAgB,GAAwB,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAC5F,OAAO,CAAC,GAAG,CACZ,CAAC;QACF,MAAM,cAAc,GAAoB;YACtC,cAAc,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ;YAC3C,cAAc,EAAE,gBAAgB,CAAC,IAAI,GAAG,CAAC;YACzC,gBAAgB,EAAE,gBAAgB,CAAC,SAAS,GAAG,CAAC;SACjD,CAAC;QAEF,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;YAC3B,OAAO,cAAc,CAAC;QACxB,CAAC;QAED,MAAM,oBAAoB,GAAgC,IAAI,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;QACxG,OAAO,oBAAoB,IAAI,cAAc,CAAC;IAChD,CAAC;IAEO,wBAAwB,CAAC,cAA+B;QAC9D,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EAAE,GAAG,cAAc,CAAC;QAE5E,IAAI,CAAC,8BAAU,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;YACvC,eAAe;YACf,MAAM,IAAI,iCAAa,CAAC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pC,YAA2B,EAC3B,QAAkB;QAElB,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9B,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,UAAU,GAAW,CAAC,CAAC;QAC3B,IAAI,QAAQ,GAAW,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;QAE/C,OAAO,UAAU,IAAI,QAAQ,EAAE,CAAC;YAC9B,MAAM,WAAW,GAAW,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;YAEjF,MAAM,IAAI,GAAW,YAAY,CAAC,mBAAmB,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC;YAE3F,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;gBACb,UAAU,GAAG,WAAW,GAAG,CAAC,CAAC;YAC/B,CAAC;iBAAM,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;gBACpB,QAAQ,GAAG,WAAW,GAAG,CAAC,CAAC;YAC7B,CAAC;iBAAM,CAAC;gBACN,cAAc;gBACd,OAAO,YAAY,CAAC,WAAW,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;QAED,gEAAgE;QAChE,gDAAgD;QAChD,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;IAEO,MAAM,CAAC,mBAAmB,CAAC,WAAwB,EAAE,QAAkB;QAC7E,MAAM,IAAI,GAAW,WAAW,CAAC,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC;QAC/D,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;YACf,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,WAAW,CAAC,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC;IACvD,CAAC;CACF;AAvMD,oCAuMC","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 { SourceMapConsumer, type RawSourceMap, type MappingItem, type Position } from 'source-map';\nimport { FileSystem, InternalError, JsonFile, NewlineKind } from '@rushstack/node-core-library';\nimport type ts from 'typescript';\n\ninterface ISourceMap {\n sourceMapConsumer: SourceMapConsumer;\n\n // SourceMapConsumer.originalPositionFor() is useless because the mapping contains numerous gaps,\n // and the API provides no way to find the nearest match. So instead we extract all the mapping items\n // and search them using SourceMapper._findNearestMappingItem().\n mappingItems: MappingItem[];\n}\n\ninterface IOriginalFileInfo {\n // Whether the .ts file exists\n fileExists: boolean;\n\n // This is used to check whether the guessed position is out of bounds.\n // Since column/line numbers are 1-based, the 0th item in this array is unused.\n maxColumnForLine: number[];\n}\n\nexport interface ISourceLocation {\n /**\n * The absolute path to the source file.\n */\n sourceFilePath: string;\n\n /**\n * The line number in the source file. The first line number is 1.\n */\n sourceFileLine: number;\n\n /**\n * The column number in the source file. The first column number is 1.\n */\n sourceFileColumn: number;\n}\n\nexport interface IGetSourceLocationOptions {\n /**\n * The source file to get the source location from.\n */\n sourceFile: ts.SourceFile;\n\n /**\n * The position within the source file to get the source location from.\n */\n pos: number;\n\n /**\n * If `false` or not provided, then we attempt to follow source maps in order to resolve the\n * location to the original `.ts` file. If resolution isn't possible for some reason, we fall\n * back to the `.d.ts` location.\n *\n * If `true`, then we don't bother following source maps, and the location refers to the `.d.ts`\n * location.\n */\n useDtsLocation?: boolean;\n}\n\nexport class SourceMapper {\n // Map from .d.ts file path --> ISourceMap if a source map was found, or null if not found\n private _sourceMapByFilePath: Map<string, ISourceMap | null> = new Map<string, ISourceMap | null>();\n\n // Cache the FileSystem.exists() result for mapped .ts files\n private _originalFileInfoByPath: Map<string, IOriginalFileInfo> = new Map<string, IOriginalFileInfo>();\n\n /**\n * Given a `.d.ts` source file and a specific position within the file, return the corresponding\n * `ISourceLocation`.\n */\n public getSourceLocation(options: IGetSourceLocationOptions): ISourceLocation {\n const lineAndCharacter: ts.LineAndCharacter = options.sourceFile.getLineAndCharacterOfPosition(\n options.pos\n );\n const sourceLocation: ISourceLocation = {\n sourceFilePath: options.sourceFile.fileName,\n sourceFileLine: lineAndCharacter.line + 1,\n sourceFileColumn: lineAndCharacter.character + 1\n };\n\n if (options.useDtsLocation) {\n return sourceLocation;\n }\n\n const mappedSourceLocation: ISourceLocation | undefined = this._getMappedSourceLocation(sourceLocation);\n return mappedSourceLocation || sourceLocation;\n }\n\n private _getMappedSourceLocation(sourceLocation: ISourceLocation): ISourceLocation | undefined {\n const { sourceFilePath, sourceFileLine, sourceFileColumn } = sourceLocation;\n\n if (!FileSystem.exists(sourceFilePath)) {\n // Sanity check\n throw new InternalError('The referenced path was not found: ' + sourceFilePath);\n }\n\n const sourceMap: ISourceMap | null = this._getSourceMap(sourceFilePath);\n if (!sourceMap) return;\n\n const nearestMappingItem: MappingItem | undefined = SourceMapper._findNearestMappingItem(\n sourceMap.mappingItems,\n {\n line: sourceFileLine,\n column: sourceFileColumn\n }\n );\n\n if (!nearestMappingItem) return;\n\n const mappedFilePath: string = path.resolve(path.dirname(sourceFilePath), nearestMappingItem.source);\n\n // Does the mapped filename exist? Use a cache to remember the answer.\n let originalFileInfo: IOriginalFileInfo | undefined = this._originalFileInfoByPath.get(mappedFilePath);\n if (originalFileInfo === undefined) {\n originalFileInfo = {\n fileExists: FileSystem.exists(mappedFilePath),\n maxColumnForLine: []\n };\n\n if (originalFileInfo.fileExists) {\n // Read the file and measure the length of each line\n originalFileInfo.maxColumnForLine = FileSystem.readFile(mappedFilePath, {\n convertLineEndings: NewlineKind.Lf\n })\n .split('\\n')\n .map((x) => x.length + 1); // +1 since columns are 1-based\n originalFileInfo.maxColumnForLine.unshift(0); // Extra item since lines are 1-based\n }\n\n this._originalFileInfoByPath.set(mappedFilePath, originalFileInfo);\n }\n\n // Don't translate coordinates to a file that doesn't exist\n if (!originalFileInfo.fileExists) return;\n\n // The nearestMappingItem anchor may be above/left of the real position, due to gaps in the mapping. Calculate\n // the delta and apply it to the original position.\n const guessedPosition: Position = {\n line: nearestMappingItem.originalLine + sourceFileLine - nearestMappingItem.generatedLine,\n column: nearestMappingItem.originalColumn + sourceFileColumn - nearestMappingItem.generatedColumn\n };\n\n // Verify that the result is not out of bounds, in cause our heuristic failed\n if (\n guessedPosition.line >= 1 &&\n guessedPosition.line < originalFileInfo.maxColumnForLine.length &&\n guessedPosition.column >= 1 &&\n guessedPosition.column <= originalFileInfo.maxColumnForLine[guessedPosition.line]\n ) {\n return {\n sourceFilePath: mappedFilePath,\n sourceFileLine: guessedPosition.line,\n sourceFileColumn: guessedPosition.column\n };\n } else {\n // The guessed position was out of bounds, so use the nearestMappingItem position instead.\n return {\n sourceFilePath: mappedFilePath,\n sourceFileLine: nearestMappingItem.originalLine,\n sourceFileColumn: nearestMappingItem.originalColumn\n };\n }\n }\n\n private _getSourceMap(sourceFilePath: string): ISourceMap | null {\n let sourceMap: ISourceMap | null | undefined = this._sourceMapByFilePath.get(sourceFilePath);\n\n if (sourceMap === undefined) {\n // Normalize the path and redo the lookup\n const normalizedPath: string = FileSystem.getRealPath(sourceFilePath);\n\n sourceMap = this._sourceMapByFilePath.get(normalizedPath);\n if (sourceMap !== undefined) {\n // Copy the result from the normalized to the non-normalized key\n this._sourceMapByFilePath.set(sourceFilePath, sourceMap);\n } else {\n // Given \"folder/file.d.ts\", check for a corresponding \"folder/file.d.ts.map\"\n const sourceMapPath: string = normalizedPath + '.map';\n if (FileSystem.exists(sourceMapPath)) {\n // Load up the source map\n const rawSourceMap: RawSourceMap = JsonFile.load(sourceMapPath) as RawSourceMap;\n\n const sourceMapConsumer: SourceMapConsumer = new SourceMapConsumer(rawSourceMap);\n const mappingItems: MappingItem[] = [];\n\n // Extract the list of mapping items\n sourceMapConsumer.eachMapping(\n (mappingItem: MappingItem) => {\n mappingItems.push({\n ...mappingItem,\n // The \"source-map\" package inexplicably uses 1-based line numbers but 0-based column numbers.\n // Fix that up proactively so we don't have to deal with it later.\n generatedColumn: mappingItem.generatedColumn + 1,\n originalColumn: mappingItem.originalColumn + 1\n });\n },\n this,\n SourceMapConsumer.GENERATED_ORDER\n );\n\n sourceMap = { sourceMapConsumer, mappingItems };\n } else {\n // No source map for this filename\n sourceMap = null;\n }\n\n this._sourceMapByFilePath.set(normalizedPath, sourceMap);\n if (sourceFilePath !== normalizedPath) {\n // Add both keys to the map\n this._sourceMapByFilePath.set(sourceFilePath, sourceMap);\n }\n }\n }\n\n return sourceMap;\n }\n\n // The `mappingItems` array is sorted by generatedLine/generatedColumn (GENERATED_ORDER).\n // The _findNearestMappingItem() lookup is a simple binary search that returns the previous item\n // if there is no exact match.\n private static _findNearestMappingItem(\n mappingItems: MappingItem[],\n position: Position\n ): MappingItem | undefined {\n if (mappingItems.length === 0) {\n return undefined;\n }\n\n let startIndex: number = 0;\n let endIndex: number = mappingItems.length - 1;\n\n while (startIndex <= endIndex) {\n const middleIndex: number = startIndex + Math.floor((endIndex - startIndex) / 2);\n\n const diff: number = SourceMapper._compareMappingItem(mappingItems[middleIndex], position);\n\n if (diff < 0) {\n startIndex = middleIndex + 1;\n } else if (diff > 0) {\n endIndex = middleIndex - 1;\n } else {\n // Exact match\n return mappingItems[middleIndex];\n }\n }\n\n // If we didn't find an exact match, then endIndex < startIndex.\n // Take endIndex because it's the smaller value.\n return mappingItems[endIndex];\n }\n\n private static _compareMappingItem(mappingItem: MappingItem, position: Position): number {\n const diff: number = mappingItem.generatedLine - position.line;\n if (diff !== 0) {\n return diff;\n }\n return mappingItem.generatedColumn - position.column;\n }\n}\n"]}
1
+ {"version":3,"file":"SourceMapper.js","sourceRoot":"","sources":["../../src/collector/SourceMapper.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,2CAA6B;AAC7B,2CAAmG;AACnG,oEAAgG;AA4DhG,MAAa,YAAY;IAAzB;QACE,0FAA0F;QAClF,yBAAoB,GAAmC,IAAI,GAAG,EAA6B,CAAC;QAEpG,4DAA4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Y,CAAC,mBAAmB,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC;YAE3F,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;gBACb,UAAU,GAAG,WAAW,GAAG,CAAC,CAAC;YAC/B,CAAC;iBAAM,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;gBACpB,QAAQ,GAAG,WAAW,GAAG,CAAC,CAAC;YAC7B,CAAC;iBAAM,CAAC;gBACN,cAAc;gBACd,OAAO,YAAY,CAAC,WAAW,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;QAED,gEAAgE;QAChE,gDAAgD;QAChD,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;IAEO,MAAM,CAAC,mBAAmB,CAAC,WAAwB,EAAE,QAAkB;QAC7E,MAAM,IAAI,GAAW,WAAW,CAAC,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC;QAC/D,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;YACf,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,WAAW,CAAC,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC;IACvD,CAAC;CACF;AAvMD,oCAuMC","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 { SourceMapConsumer, type RawSourceMap, type MappingItem, type Position } from 'source-map';\nimport { FileSystem, InternalError, JsonFile, NewlineKind } from '@rushstack/node-core-library';\nimport type ts from 'typescript';\n\ninterface ISourceMap {\n sourceMapConsumer: SourceMapConsumer;\n\n // SourceMapConsumer.originalPositionFor() is useless because the mapping contains numerous gaps,\n // and the API provides no way to find the nearest match. So instead we extract all the mapping items\n // and search them using SourceMapper._findNearestMappingItem().\n mappingItems: MappingItem[];\n}\n\ninterface IOriginalFileInfo {\n // Whether the .ts file exists\n fileExists: boolean;\n\n // This is used to check whether the guessed position is out of bounds.\n // Since column/line numbers are 1-based, the 0th item in this array is unused.\n maxColumnForLine: number[];\n}\n\nexport interface ISourceLocation {\n /**\n * The absolute path to the source file.\n */\n sourceFilePath: string;\n\n /**\n * The line number in the source file. The first line number is 1.\n */\n sourceFileLine: number;\n\n /**\n * The column number in the source file. The first column number is 1.\n */\n sourceFileColumn: number;\n}\n\nexport interface IGetSourceLocationOptions {\n /**\n * The source file to get the source location from.\n */\n sourceFile: ts.SourceFile;\n\n /**\n * The position within the source file to get the source location from.\n */\n pos: number;\n\n /**\n * If `false` or not provided, then we attempt to follow source maps in order to resolve the\n * location to the original `.ts` file. If resolution isn't possible for some reason, we fall\n * back to the `.d.ts` location.\n *\n * If `true`, then we don't bother following source maps, and the location refers to the `.d.ts`\n * location.\n */\n useDtsLocation?: boolean;\n}\n\nexport class SourceMapper {\n // Map from .d.ts file path --> ISourceMap if a source map was found, or null if not found\n private _sourceMapByFilePath: Map<string, ISourceMap | null> = new Map<string, ISourceMap | null>();\n\n // Cache the FileSystem.exists() result for mapped .ts files\n private _originalFileInfoByPath: Map<string, IOriginalFileInfo> = new Map<string, IOriginalFileInfo>();\n\n /**\n * Given a `.d.ts` source file and a specific position within the file, return the corresponding\n * `ISourceLocation`.\n */\n public getSourceLocation(options: IGetSourceLocationOptions): ISourceLocation {\n const lineAndCharacter: ts.LineAndCharacter = options.sourceFile.getLineAndCharacterOfPosition(\n options.pos\n );\n const sourceLocation: ISourceLocation = {\n sourceFilePath: options.sourceFile.fileName,\n sourceFileLine: lineAndCharacter.line + 1,\n sourceFileColumn: lineAndCharacter.character + 1\n };\n\n if (options.useDtsLocation) {\n return sourceLocation;\n }\n\n const mappedSourceLocation: ISourceLocation | undefined = this._getMappedSourceLocation(sourceLocation);\n return mappedSourceLocation || sourceLocation;\n }\n\n private _getMappedSourceLocation(sourceLocation: ISourceLocation): ISourceLocation | undefined {\n const { sourceFilePath, sourceFileLine, sourceFileColumn } = sourceLocation;\n\n if (!FileSystem.exists(sourceFilePath)) {\n // Sanity check\n throw new InternalError('The referenced path was not found: ' + sourceFilePath);\n }\n\n const sourceMap: ISourceMap | null = this._getSourceMap(sourceFilePath);\n if (!sourceMap) return;\n\n const nearestMappingItem: MappingItem | undefined = SourceMapper._findNearestMappingItem(\n sourceMap.mappingItems,\n {\n line: sourceFileLine,\n column: sourceFileColumn\n }\n );\n\n if (!nearestMappingItem) return;\n\n const mappedFilePath: string = path.resolve(path.dirname(sourceFilePath), nearestMappingItem.source);\n\n // Does the mapped filename exist? Use a cache to remember the answer.\n let originalFileInfo: IOriginalFileInfo | undefined = this._originalFileInfoByPath.get(mappedFilePath);\n if (originalFileInfo === undefined) {\n originalFileInfo = {\n fileExists: FileSystem.exists(mappedFilePath),\n maxColumnForLine: []\n };\n\n if (originalFileInfo.fileExists) {\n // Read the file and measure the length of each line\n originalFileInfo.maxColumnForLine = FileSystem.readFile(mappedFilePath, {\n convertLineEndings: NewlineKind.Lf\n })\n .split('\\n')\n .map((x) => x.length + 1); // +1 since columns are 1-based\n originalFileInfo.maxColumnForLine.unshift(0); // Extra item since lines are 1-based\n }\n\n this._originalFileInfoByPath.set(mappedFilePath, originalFileInfo);\n }\n\n // Don't translate coordinates to a file that doesn't exist\n if (!originalFileInfo.fileExists) return;\n\n // The nearestMappingItem anchor may be above/left of the real position, due to gaps in the mapping. Calculate\n // the delta and apply it to the original position.\n const guessedPosition: Position = {\n line: nearestMappingItem.originalLine + sourceFileLine - nearestMappingItem.generatedLine,\n column: nearestMappingItem.originalColumn + sourceFileColumn - nearestMappingItem.generatedColumn\n };\n\n // Verify that the result is not out of bounds, in cause our heuristic failed\n if (\n guessedPosition.line >= 1 &&\n guessedPosition.line < originalFileInfo.maxColumnForLine.length &&\n guessedPosition.column >= 1 &&\n guessedPosition.column <= originalFileInfo.maxColumnForLine[guessedPosition.line]\n ) {\n return {\n sourceFilePath: mappedFilePath,\n sourceFileLine: guessedPosition.line,\n sourceFileColumn: guessedPosition.column\n };\n } else {\n // The guessed position was out of bounds, so use the nearestMappingItem position instead.\n return {\n sourceFilePath: mappedFilePath,\n sourceFileLine: nearestMappingItem.originalLine,\n sourceFileColumn: nearestMappingItem.originalColumn\n };\n }\n }\n\n private _getSourceMap(sourceFilePath: string): ISourceMap | null {\n let sourceMap: ISourceMap | null | undefined = this._sourceMapByFilePath.get(sourceFilePath);\n\n if (sourceMap === undefined) {\n // Normalize the path and redo the lookup\n const normalizedPath: string = FileSystem.getRealPath(sourceFilePath);\n\n sourceMap = this._sourceMapByFilePath.get(normalizedPath);\n if (sourceMap !== undefined) {\n // Copy the result from the normalized to the non-normalized key\n this._sourceMapByFilePath.set(sourceFilePath, sourceMap);\n } else {\n // Given \"folder/file.d.ts\", check for a corresponding \"folder/file.d.ts.map\"\n const sourceMapPath: string = normalizedPath + '.map';\n if (FileSystem.exists(sourceMapPath)) {\n // Load up the source map\n const rawSourceMap: RawSourceMap = JsonFile.load(sourceMapPath) as RawSourceMap;\n\n const sourceMapConsumer: SourceMapConsumer = new SourceMapConsumer(rawSourceMap);\n const mappingItems: MappingItem[] = [];\n\n // Extract the list of mapping items\n sourceMapConsumer.eachMapping(\n (mappingItem: MappingItem) => {\n mappingItems.push({\n ...mappingItem,\n // The \"source-map\" package inexplicably uses 1-based line numbers but 0-based column numbers.\n // Fix that up proactively so we don't have to deal with it later.\n generatedColumn: mappingItem.generatedColumn + 1,\n originalColumn: mappingItem.originalColumn + 1\n });\n },\n this,\n SourceMapConsumer.GENERATED_ORDER\n );\n\n sourceMap = { sourceMapConsumer, mappingItems };\n } else {\n // No source map for this filename\n sourceMap = null;\n }\n\n this._sourceMapByFilePath.set(normalizedPath, sourceMap);\n if (sourceFilePath !== normalizedPath) {\n // Add both keys to the map\n this._sourceMapByFilePath.set(sourceFilePath, sourceMap);\n }\n }\n }\n\n return sourceMap;\n }\n\n // The `mappingItems` array is sorted by generatedLine/generatedColumn (GENERATED_ORDER).\n // The _findNearestMappingItem() lookup is a simple binary search that returns the previous item\n // if there is no exact match.\n private static _findNearestMappingItem(\n mappingItems: MappingItem[],\n position: Position\n ): MappingItem | undefined {\n if (mappingItems.length === 0) {\n return undefined;\n }\n\n let startIndex: number = 0;\n let endIndex: number = mappingItems.length - 1;\n\n while (startIndex <= endIndex) {\n const middleIndex: number = startIndex + Math.floor((endIndex - startIndex) / 2);\n\n const diff: number = SourceMapper._compareMappingItem(mappingItems[middleIndex], position);\n\n if (diff < 0) {\n startIndex = middleIndex + 1;\n } else if (diff > 0) {\n endIndex = middleIndex - 1;\n } else {\n // Exact match\n return mappingItems[middleIndex];\n }\n }\n\n // If we didn't find an exact match, then endIndex < startIndex.\n // Take endIndex because it's the smaller value.\n return mappingItems[endIndex];\n }\n\n private static _compareMappingItem(mappingItem: MappingItem, position: Position): number {\n const diff: number = mappingItem.generatedLine - position.line;\n if (diff !== 0) {\n return diff;\n }\n return mappingItem.generatedColumn - position.column;\n }\n}\n"]}
@@ -225,7 +225,10 @@ class ApiModelGenerator {
225
225
  }
226
226
  _processChildDeclarations(astDeclaration, context) {
227
227
  for (const childDeclaration of astDeclaration.children) {
228
- this._processDeclaration(childDeclaration, Object.assign(Object.assign({}, context), { name: childDeclaration.astSymbol.localName }));
228
+ this._processDeclaration(childDeclaration, {
229
+ ...context,
230
+ name: childDeclaration.astSymbol.localName
231
+ });
229
232
  }
230
233
  }
231
234
  _processApiCallSignature(astDeclaration, context) {
@@ -330,7 +333,10 @@ class ApiModelGenerator {
330
333
  });
331
334
  parentApiItem.addMember(apiClass);
332
335
  }
333
- this._processChildDeclarations(astDeclaration, Object.assign(Object.assign({}, context), { parentApiItem: apiClass }));
336
+ this._processChildDeclarations(astDeclaration, {
337
+ ...context,
338
+ parentApiItem: apiClass
339
+ });
334
340
  }
335
341
  _processApiConstructSignature(astDeclaration, context) {
336
342
  const { parentApiItem } = context;
@@ -384,7 +390,10 @@ class ApiModelGenerator {
384
390
  });
385
391
  parentApiItem.addMember(apiEnum);
386
392
  }
387
- this._processChildDeclarations(astDeclaration, Object.assign(Object.assign({}, context), { parentApiItem: apiEnum }));
393
+ this._processChildDeclarations(astDeclaration, {
394
+ ...context,
395
+ parentApiItem: apiEnum
396
+ });
388
397
  }
389
398
  _processApiEnumMember(astDeclaration, context) {
390
399
  const { name, parentApiItem } = context;
@@ -511,7 +520,10 @@ class ApiModelGenerator {
511
520
  });
512
521
  parentApiItem.addMember(apiInterface);
513
522
  }
514
- this._processChildDeclarations(astDeclaration, Object.assign(Object.assign({}, context), { parentApiItem: apiInterface }));
523
+ this._processChildDeclarations(astDeclaration, {
524
+ ...context,
525
+ parentApiItem: apiInterface
526
+ });
515
527
  }
516
528
  _processApiMethod(astDeclaration, context) {
517
529
  const { name, parentApiItem } = context;
@@ -608,7 +620,10 @@ class ApiModelGenerator {
608
620
  });
609
621
  parentApiItem.addMember(apiNamespace);
610
622
  }
611
- this._processChildDeclarations(astDeclaration, Object.assign(Object.assign({}, context), { parentApiItem: apiNamespace }));
623
+ this._processChildDeclarations(astDeclaration, {
624
+ ...context,
625
+ parentApiItem: apiNamespace
626
+ });
612
627
  }
613
628
  _processApiProperty(astDeclaration, context) {
614
629
  const { name, parentApiItem } = context;
@@ -1 +1 @@
1
- {"version":3,"file":"ApiModelGenerator.js","sourceRoot":"","sources":["../../src/generators/ApiModelGenerator.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,+BAA+B;AAE/B,2CAA6B;AAC7B,+CAAiC;AAEjC,wEA2BwC;AACxC,oEAAoD;AAKpD,qDAAqF;AACrF,qDAAkD;AAClD,mFAAgF;AAGhF,uEAAoE;AAGpE,yEAAsE;AAmBtE,MAAa,iBAAiB;IAQ5B,YAAmB,SAAoB,EAAE,eAAgC;QACvE,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,8BAAQ,EAAE,CAAC;QAChC,IAAI,CAAC,mBAAmB,GAAG,IAAI,6DAA6B,CAAC,SAAS,CAAC,CAAC;Q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mB,CAAC,UAAU,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;gBAE7D,OAAO,mBAAmB,IAAI,iBAAiB,IAAI,oBAAoB,IAAI,UAAU,CAAC;YACxF,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACR,oEAAoE;gBACpE,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;IACH,CAAC;IAEO,eAAe,CAAC,WAA2B;QACjD,MAAM,UAAU,GAAkB,WAAW,CAAC,aAAa,EAAE,CAAC;QAC9D,MAAM,cAAc,GAAoB,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,iBAAiB,CAAC;YACrF,UAAU;YACV,GAAG,EAAE,WAAW,CAAC,GAAG;SACrB,CAAC,CAAC;QAEH,IAAI,MAAM,GAAW,IAAI,CAAC,QAAQ,CAChC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,aAAa,EAC7C,cAAc,CAAC,cAAc,CAC9B,CAAC;QACF,MAAM,GAAG,wBAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;QACvC,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAxmCD,8CAwmCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n/* eslint-disable no-bitwise */\n\nimport * as path from 'path';\nimport * as ts from 'typescript';\nimport type * as tsdoc from '@microsoft/tsdoc';\nimport {\n ApiModel,\n ApiClass,\n ApiPackage,\n ApiEntryPoint,\n ApiMethod,\n ApiNamespace,\n ApiInterface,\n ApiPropertySignature,\n type ApiItemContainerMixin,\n ReleaseTag,\n ApiProperty,\n ApiMethodSignature,\n type IApiParameterOptions,\n ApiEnum,\n ApiEnumMember,\n type IExcerptTokenRange,\n type IExcerptToken,\n ApiConstructor,\n ApiConstructSignature,\n ApiFunction,\n ApiIndexSignature,\n ApiVariable,\n ApiTypeAlias,\n ApiCallSignature,\n type IApiTypeParameterOptions,\n EnumMemberOrder\n} from '@microsoft/api-extractor-model';\nimport { Path } from '@rushstack/node-core-library';\n\nimport type { Collector } from '../collector/Collector';\nimport type { ISourceLocation } from '../collector/SourceMapper';\nimport type { AstDeclaration } from '../analyzer/AstDeclaration';\nimport { ExcerptBuilder, type IExcerptBuilderNodeToCapture } from './ExcerptBuilder';\nimport { AstSymbol } from '../analyzer/AstSymbol';\nimport { DeclarationReferenceGenerator } from './DeclarationReferenceGenerator';\nimport type { ApiItemMetadata } from '../collector/ApiItemMetadata';\nimport type { DeclarationMetadata } from '../collector/DeclarationMetadata';\nimport { AstNamespaceImport } from '../analyzer/AstNamespaceImport';\nimport type { AstEntity } from '../analyzer/AstEntity';\nimport type { AstModule } from '../analyzer/AstModule';\nimport { TypeScriptInternals } from '../analyzer/TypeScriptInternals';\nimport type { ExtractorConfig } from '../api/ExtractorConfig';\n\ninterface IProcessAstEntityContext {\n name: string;\n isExported: boolean;\n parentApiItem: ApiItemContainerMixin;\n}\n\n/**\n * @beta\n */\nexport interface IApiModelGenerationOptions {\n /**\n * The release tags to trim.\n */\n releaseTagsToTrim: Set<ReleaseTag>;\n}\n\nexport class ApiModelGenerator {\n private readonly _collector: Collector;\n private readonly _apiModel: ApiModel;\n private readonly _referenceGenerator: DeclarationReferenceGenerator;\n private readonly _releaseTagsToTrim: Set<ReleaseTag> | undefined;\n\n public readonly docModelEnabled: boolean;\n\n public constructor(collector: Collector, extractorConfig: ExtractorConfig) {\n this._collector = collector;\n this._apiModel = new ApiModel();\n this._referenceGenerator = new DeclarationReferenceGenerator(collector);\n\n const apiModelGenerationOptions: IApiModelGenerationOptions | undefined =\n extractorConfig.docModelGenerationOptions;\n if (apiModelGenerationOptions) {\n this._releaseTagsToTrim = apiModelGenerationOptions.releaseTagsToTrim;\n this.docModelEnabled = true;\n } else {\n this.docModelEnabled = false;\n }\n }\n\n public get apiModel(): ApiModel {\n return this._apiModel;\n }\n\n public buildApiPackage(): ApiPackage {\n const packageDocComment: tsdoc.DocComment | undefined = this._collector.workingPackage.tsdocComment;\n\n const apiPackage: ApiPackage = new ApiPackage({\n name: this._collector.workingPackage.name,\n docComment: packageDocComment,\n tsdocConfiguration: this._collector.extractorConfig.tsdocConfiguration,\n projectFolderUrl: this._collector.extractorConfig.projectFolderUrl\n });\n this._apiModel.addMember(apiPackage);\n\n const apiEntryPoint: ApiEntryPoint = new ApiEntryPoint({ name: '' });\n apiPackage.addMember(apiEntryPoint);\n\n for (const entity of this._collector.entities) {\n // Only process entities that are exported from the entry point. Entities that are exported from\n // `AstNamespaceImport` entities will be processed by `_processAstNamespaceImport`. However, if\n // we are including forgotten exports, then process everything.\n if (entity.exportedFromEntryPoint || this._collector.extractorConfig.docModelIncludeForgottenExports) {\n this._processAstEntity(entity.astEntity, {\n name: entity.nameForEmit!,\n isExported: entity.exportedFromEntryPoint,\n parentApiItem: apiEntryPoint\n });\n }\n }\n\n return apiPackage;\n }\n\n private _processAstEntity(astEntity: AstEntity, context: IProcessAstEntityContext): void {\n if (astEntity instanceof AstSymbol) {\n // Skip ancillary declarations; we will process them with the main declaration\n for (const astDeclaration of this._collector.getNonAncillaryDeclarations(astEntity)) {\n this._processDeclaration(astDeclaration, context);\n }\n return;\n }\n\n if (astEntity instanceof AstNamespaceImport) {\n // Note that a single API item can belong to two different AstNamespaceImport namespaces. For example:\n //\n // // file.ts defines \"thing()\"\n // import * as example1 from \"./file\";\n // import * as example2 from \"./file\";\n //\n // // ...so here we end up with example1.thing() and example2.thing()\n // export { example1, example2 }\n //\n // The current logic does not try to associate \"thing()\" with a specific parent. Instead\n // the API documentation will show duplicated entries for example1.thing() and example2.thing().\n //\n // This could be improved in the future, but it requires a stable mechanism for choosing an associated parent.\n // For thoughts about this: https://github.com/microsoft/rushstack/issues/1308\n this._processAstNamespaceImport(astEntity, context);\n return;\n }\n\n // TODO: Figure out how to represent reexported AstImport objects. Basically we need to introduce a new\n // ApiItem subclass for \"export alias\", similar to a type alias, but representing declarations of the\n // form \"export { X } from 'external-package'\". We can also use this to solve GitHub issue #950.\n }\n\n private _processAstNamespaceImport(\n astNamespaceImport: AstNamespaceImport,\n context: IProcessAstEntityContext\n ): void {\n const astModule: AstModule = astNamespaceImport.astModule;\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiNamespace.getContainerKey(name);\n const fileUrlPath: string = this._getFileUrlPath(astNamespaceImport.declaration);\n\n let apiNamespace: ApiNamespace | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiNamespace;\n\n if (apiNamespace === undefined) {\n apiNamespace = new ApiNamespace({\n name,\n docComment: undefined,\n releaseTag: ReleaseTag.None,\n excerptTokens: [],\n isExported,\n fileUrlPath\n });\n parentApiItem.addMember(apiNamespace);\n }\n\n astModule.astModuleExportInfo!.exportedLocalEntities.forEach(\n (exportedEntity: AstEntity, exportedName: string) => {\n this._processAstEntity(exportedEntity, {\n name: exportedName,\n isExported: true,\n parentApiItem: apiNamespace!\n });\n }\n );\n }\n\n private _processDeclaration(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n if ((astDeclaration.modifierFlags & ts.ModifierFlags.Private) !== 0) {\n return; // trim out private declarations\n }\n\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n if (this._releaseTagsToTrim?.has(releaseTag)) {\n return;\n }\n\n switch (astDeclaration.declaration.kind) {\n case ts.SyntaxKind.CallSignature:\n this._processApiCallSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.Constructor:\n this._processApiConstructor(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.ConstructSignature:\n this._processApiConstructSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.ClassDeclaration:\n this._processApiClass(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.EnumDeclaration:\n this._processApiEnum(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.EnumMember:\n this._processApiEnumMember(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.FunctionDeclaration:\n this._processApiFunction(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.GetAccessor:\n this._processApiProperty(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.SetAccessor:\n this._processApiProperty(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.IndexSignature:\n this._processApiIndexSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.InterfaceDeclaration:\n this._processApiInterface(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.MethodDeclaration:\n this._processApiMethod(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.MethodSignature:\n this._processApiMethodSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.ModuleDeclaration:\n this._processApiNamespace(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.PropertyDeclaration:\n this._processApiProperty(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.PropertySignature:\n this._processApiPropertySignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.TypeAliasDeclaration:\n this._processApiTypeAlias(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.VariableDeclaration:\n // check for arrow functions in variable declaration\n const functionDeclaration: ts.FunctionDeclaration | undefined =\n this._tryFindFunctionDeclaration(astDeclaration);\n if (functionDeclaration) {\n this._processApiFunction(astDeclaration, context, functionDeclaration);\n } else {\n this._processApiVariable(astDeclaration, context);\n }\n break;\n\n default:\n // ignore unknown types\n }\n }\n\n private _tryFindFunctionDeclaration(astDeclaration: AstDeclaration): ts.FunctionDeclaration | undefined {\n const children: readonly ts.Node[] = astDeclaration.declaration.getChildren(\n astDeclaration.declaration.getSourceFile()\n );\n return children.find(ts.isFunctionTypeNode) as ts.FunctionDeclaration | undefined;\n }\n\n private _processChildDeclarations(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n for (const childDeclaration of astDeclaration.children) {\n this._processDeclaration(childDeclaration, {\n ...context,\n name: childDeclaration.astSymbol.localName\n });\n }\n }\n\n private _processApiCallSignature(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiCallSignature.getContainerKey(overloadIndex);\n\n let apiCallSignature: ApiCallSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiCallSignature;\n\n if (apiCallSignature === undefined) {\n const callSignature: ts.CallSignatureDeclaration =\n astDeclaration.declaration as ts.CallSignatureDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: callSignature.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n callSignature.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n callSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(callSignature);\n\n apiCallSignature = new ApiCallSignature({\n docComment,\n releaseTag,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiCallSignature);\n }\n }\n\n private _processApiConstructor(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiConstructor.getContainerKey(overloadIndex);\n\n let apiConstructor: ApiConstructor | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiConstructor;\n\n if (apiConstructor === undefined) {\n const constructorDeclaration: ts.ConstructorDeclaration =\n astDeclaration.declaration as ts.ConstructorDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n constructorDeclaration.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isProtected: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Protected) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(constructorDeclaration);\n\n apiConstructor = new ApiConstructor({\n docComment,\n releaseTag,\n isProtected,\n parameters,\n overloadIndex,\n excerptTokens,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiConstructor);\n }\n }\n\n private _processApiClass(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiClass.getContainerKey(name);\n\n let apiClass: ApiClass | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiClass;\n\n if (apiClass === undefined) {\n const classDeclaration: ts.ClassDeclaration = astDeclaration.declaration as ts.ClassDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n classDeclaration.typeParameters\n );\n\n let extendsTokenRange: IExcerptTokenRange | undefined = undefined;\n const implementsTokenRanges: IExcerptTokenRange[] = [];\n\n for (const heritageClause of classDeclaration.heritageClauses || []) {\n if (heritageClause.token === ts.SyntaxKind.ExtendsKeyword) {\n extendsTokenRange = ExcerptBuilder.createEmptyTokenRange();\n if (heritageClause.types.length > 0) {\n nodesToCapture.push({ node: heritageClause.types[0], tokenRange: extendsTokenRange });\n }\n } else if (heritageClause.token === ts.SyntaxKind.ImplementsKeyword) {\n for (const heritageType of heritageClause.types) {\n const implementsTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n implementsTokenRanges.push(implementsTokenRange);\n nodesToCapture.push({ node: heritageType, tokenRange: implementsTokenRange });\n }\n }\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isAbstract: boolean =\n (ts.getCombinedModifierFlags(classDeclaration) & ts.ModifierFlags.Abstract) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(classDeclaration);\n\n apiClass = new ApiClass({\n name,\n isAbstract,\n docComment,\n releaseTag,\n excerptTokens,\n typeParameters,\n extendsTokenRange,\n implementsTokenRanges,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiClass);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiClass\n });\n }\n\n private _processApiConstructSignature(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext\n ): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiConstructSignature.getContainerKey(overloadIndex);\n\n let apiConstructSignature: ApiConstructSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiConstructSignature;\n\n if (apiConstructSignature === undefined) {\n const constructSignature: ts.ConstructSignatureDeclaration =\n astDeclaration.declaration as ts.ConstructSignatureDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: constructSignature.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n constructSignature.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n constructSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(constructSignature);\n\n apiConstructSignature = new ApiConstructSignature({\n docComment,\n releaseTag,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiConstructSignature);\n }\n }\n\n private _processApiEnum(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiEnum.getContainerKey(name);\n\n let apiEnum: ApiEnum | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiEnum;\n\n if (apiEnum === undefined) {\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, []);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const preserveMemberOrder: boolean =\n this._collector.extractorConfig.enumMemberOrder === EnumMemberOrder.Preserve;\n const fileUrlPath: string = this._getFileUrlPath(astDeclaration.declaration);\n\n apiEnum = new ApiEnum({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n preserveMemberOrder,\n isExported,\n fileUrlPath\n });\n parentApiItem.addMember(apiEnum);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiEnum\n });\n }\n\n private _processApiEnumMember(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, parentApiItem } = context;\n const containerKey: string = ApiEnumMember.getContainerKey(name);\n\n let apiEnumMember: ApiEnumMember | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiEnumMember;\n\n if (apiEnumMember === undefined) {\n const enumMember: ts.EnumMember = astDeclaration.declaration as ts.EnumMember;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n let initializerTokenRange: IExcerptTokenRange | undefined = undefined;\n if (enumMember.initializer) {\n initializerTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: enumMember.initializer, tokenRange: initializerTokenRange });\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(enumMember);\n\n apiEnumMember = new ApiEnumMember({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n initializerTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiEnumMember);\n }\n }\n\n private _processApiFunction(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext,\n altFunctionDeclaration?: ts.FunctionDeclaration\n ): void {\n const { name, isExported, parentApiItem } = context;\n\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiFunction.getContainerKey(name, overloadIndex);\n\n let apiFunction: ApiFunction | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiFunction;\n\n if (apiFunction === undefined) {\n const functionDeclaration: ts.FunctionDeclaration =\n altFunctionDeclaration ?? (astDeclaration.declaration as ts.FunctionDeclaration);\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: functionDeclaration.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n functionDeclaration.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n functionDeclaration.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(functionDeclaration);\n\n apiFunction = new ApiFunction({\n name,\n docComment,\n releaseTag,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiFunction);\n }\n }\n\n private _processApiIndexSignature(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiIndexSignature.getContainerKey(overloadIndex);\n\n let apiIndexSignature: ApiIndexSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiIndexSignature;\n\n if (apiIndexSignature === undefined) {\n const indexSignature: ts.IndexSignatureDeclaration =\n astDeclaration.declaration as ts.IndexSignatureDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: indexSignature.type, tokenRange: returnTypeTokenRange });\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n indexSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(indexSignature);\n\n apiIndexSignature = new ApiIndexSignature({\n docComment,\n releaseTag,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n isReadonly,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiIndexSignature);\n }\n }\n\n private _processApiInterface(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiInterface.getContainerKey(name);\n\n let apiInterface: ApiInterface | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiInterface;\n\n if (apiInterface === undefined) {\n const interfaceDeclaration: ts.InterfaceDeclaration =\n astDeclaration.declaration as ts.InterfaceDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n interfaceDeclaration.typeParameters\n );\n\n const extendsTokenRanges: IExcerptTokenRange[] = [];\n\n for (const heritageClause of interfaceDeclaration.heritageClauses || []) {\n if (heritageClause.token === ts.SyntaxKind.ExtendsKeyword) {\n for (const heritageType of heritageClause.types) {\n const extendsTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n extendsTokenRanges.push(extendsTokenRange);\n nodesToCapture.push({ node: heritageType, tokenRange: extendsTokenRange });\n }\n }\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(interfaceDeclaration);\n\n apiInterface = new ApiInterface({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n typeParameters,\n extendsTokenRanges,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiInterface);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiInterface\n });\n }\n\n private _processApiMethod(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, parentApiItem } = context;\n const isStatic: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Static) !== 0;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiMethod.getContainerKey(name, isStatic, overloadIndex);\n\n let apiMethod: ApiMethod | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiMethod;\n\n if (apiMethod === undefined) {\n const methodDeclaration: ts.MethodDeclaration = astDeclaration.declaration as ts.MethodDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: methodDeclaration.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n methodDeclaration.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n methodDeclaration.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n if (releaseTag === ReleaseTag.Internal || releaseTag === ReleaseTag.Alpha) {\n return; // trim out items marked as \"@internal\" or \"@alpha\"\n }\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const isProtected: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Protected) !== 0;\n const isAbstract: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Abstract) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(methodDeclaration);\n\n apiMethod = new ApiMethod({\n name,\n isAbstract,\n docComment,\n releaseTag,\n isProtected,\n isStatic,\n isOptional,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiMethod);\n }\n }\n\n private _processApiMethodSignature(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext\n ): void {\n const { name, parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiMethodSignature.getContainerKey(name, overloadIndex);\n\n let apiMethodSignature: ApiMethodSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiMethodSignature;\n\n if (apiMethodSignature === undefined) {\n const methodSignature: ts.MethodSignature = astDeclaration.declaration as ts.MethodSignature;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: methodSignature.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n methodSignature.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n methodSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(methodSignature);\n\n apiMethodSignature = new ApiMethodSignature({\n name,\n docComment,\n releaseTag,\n isOptional,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiMethodSignature);\n }\n }\n\n private _processApiNamespace(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiNamespace.getContainerKey(name);\n\n let apiNamespace: ApiNamespace | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiNamespace;\n\n if (apiNamespace === undefined) {\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, []);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(astDeclaration.declaration);\n\n apiNamespace = new ApiNamespace({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n isExported,\n fileUrlPath\n });\n parentApiItem.addMember(apiNamespace);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiNamespace\n });\n }\n\n private _processApiProperty(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, parentApiItem } = context;\n const isStatic: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Static) !== 0;\n const containerKey: string = ApiProperty.getContainerKey(name, isStatic);\n\n let apiProperty: ApiProperty | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiProperty;\n\n if (apiProperty === undefined) {\n const declaration: ts.Declaration = astDeclaration.declaration;\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const propertyTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n let propertyTypeNode: ts.TypeNode | undefined;\n\n if (ts.isPropertyDeclaration(declaration) || ts.isGetAccessorDeclaration(declaration)) {\n propertyTypeNode = declaration.type;\n }\n\n if (ts.isSetAccessorDeclaration(declaration)) {\n // Note that TypeScript always reports an error if a setter does not have exactly one parameter.\n propertyTypeNode = declaration.parameters[0].type;\n }\n\n nodesToCapture.push({ node: propertyTypeNode, tokenRange: propertyTypeTokenRange });\n\n let initializerTokenRange: IExcerptTokenRange | undefined = undefined;\n if (ts.isPropertyDeclaration(declaration) && declaration.initializer) {\n initializerTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: declaration.initializer, tokenRange: initializerTokenRange });\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const isProtected: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Protected) !== 0;\n const isAbstract: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Abstract) !== 0;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(declaration);\n\n apiProperty = new ApiProperty({\n name,\n docComment,\n releaseTag,\n isAbstract,\n isProtected,\n isStatic,\n isOptional,\n isReadonly,\n excerptTokens,\n propertyTypeTokenRange,\n initializerTokenRange,\n fileUrlPath\n });\n parentApiItem.addMember(apiProperty);\n } else {\n // If the property was already declared before (via a merged interface declaration),\n // we assume its signature is identical, because the language requires that.\n }\n }\n\n private _processApiPropertySignature(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext\n ): void {\n const { name, parentApiItem } = context;\n const containerKey: string = ApiPropertySignature.getContainerKey(name);\n\n let apiPropertySignature: ApiPropertySignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiPropertySignature;\n\n if (apiPropertySignature === undefined) {\n const propertySignature: ts.PropertySignature = astDeclaration.declaration as ts.PropertySignature;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const propertyTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: propertySignature.type, tokenRange: propertyTypeTokenRange });\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(propertySignature);\n\n apiPropertySignature = new ApiPropertySignature({\n name,\n docComment,\n releaseTag,\n isOptional,\n excerptTokens,\n propertyTypeTokenRange,\n isReadonly,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiPropertySignature);\n } else {\n // If the property was already declared before (via a merged interface declaration),\n // we assume its signature is identical, because the language requires that.\n }\n }\n\n private _processApiTypeAlias(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n\n const containerKey: string = ApiTypeAlias.getContainerKey(name);\n\n let apiTypeAlias: ApiTypeAlias | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiTypeAlias;\n\n if (apiTypeAlias === undefined) {\n const typeAliasDeclaration: ts.TypeAliasDeclaration =\n astDeclaration.declaration as ts.TypeAliasDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n typeAliasDeclaration.typeParameters\n );\n\n const typeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: typeAliasDeclaration.type, tokenRange: typeTokenRange });\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(typeAliasDeclaration);\n\n apiTypeAlias = new ApiTypeAlias({\n name,\n docComment,\n typeParameters,\n releaseTag,\n excerptTokens,\n typeTokenRange,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiTypeAlias);\n }\n }\n\n private _processApiVariable(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n\n const containerKey: string = ApiVariable.getContainerKey(name);\n\n let apiVariable: ApiVariable | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiVariable;\n\n if (apiVariable === undefined) {\n const variableDeclaration: ts.VariableDeclaration =\n astDeclaration.declaration as ts.VariableDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const variableTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: variableDeclaration.type, tokenRange: variableTypeTokenRange });\n\n let initializerTokenRange: IExcerptTokenRange | undefined = undefined;\n if (variableDeclaration.initializer) {\n initializerTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: variableDeclaration.initializer, tokenRange: initializerTokenRange });\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(variableDeclaration);\n\n apiVariable = new ApiVariable({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n variableTypeTokenRange,\n initializerTokenRange,\n isReadonly,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiVariable);\n }\n }\n\n /**\n * @param nodesToCapture - A list of child nodes whose token ranges we want to capture\n */\n private _buildExcerptTokens(\n astDeclaration: AstDeclaration,\n nodesToCapture: IExcerptBuilderNodeToCapture[]\n ): IExcerptToken[] {\n const excerptTokens: IExcerptToken[] = [];\n\n // Build the main declaration\n ExcerptBuilder.addDeclaration(excerptTokens, astDeclaration, nodesToCapture, this._referenceGenerator);\n\n const declarationMetadata: DeclarationMetadata = this._collector.fetchDeclarationMetadata(astDeclaration);\n\n // Add any ancillary declarations\n for (const ancillaryDeclaration of declarationMetadata.ancillaryDeclarations) {\n ExcerptBuilder.addBlankLine(excerptTokens);\n ExcerptBuilder.addDeclaration(\n excerptTokens,\n ancillaryDeclaration,\n nodesToCapture,\n this._referenceGenerator\n );\n }\n\n return excerptTokens;\n }\n\n private _captureTypeParameters(\n nodesToCapture: IExcerptBuilderNodeToCapture[],\n typeParameterNodes: ts.NodeArray<ts.TypeParameterDeclaration> | undefined\n ): IApiTypeParameterOptions[] {\n const typeParameters: IApiTypeParameterOptions[] = [];\n if (typeParameterNodes) {\n for (const typeParameter of typeParameterNodes) {\n const constraintTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: typeParameter.constraint, tokenRange: constraintTokenRange });\n\n const defaultTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: typeParameter.default, tokenRange: defaultTypeTokenRange });\n\n typeParameters.push({\n typeParameterName: typeParameter.name.getText().trim(),\n constraintTokenRange,\n defaultTypeTokenRange\n });\n }\n }\n return typeParameters;\n }\n\n private _captureParameters(\n nodesToCapture: IExcerptBuilderNodeToCapture[],\n parameterNodes: ts.NodeArray<ts.ParameterDeclaration>\n ): IApiParameterOptions[] {\n const parameters: IApiParameterOptions[] = [];\n for (const parameter of parameterNodes) {\n const parameterTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: parameter.type, tokenRange: parameterTypeTokenRange });\n parameters.push({\n parameterName: parameter.name.getText().trim(),\n parameterTypeTokenRange,\n isOptional: this._collector.typeChecker.isOptionalParameter(parameter)\n });\n }\n return parameters;\n }\n\n private _isReadonly(astDeclaration: AstDeclaration): boolean {\n switch (astDeclaration.declaration.kind) {\n case ts.SyntaxKind.GetAccessor:\n case ts.SyntaxKind.IndexSignature:\n case ts.SyntaxKind.PropertyDeclaration:\n case ts.SyntaxKind.PropertySignature:\n case ts.SyntaxKind.SetAccessor:\n case ts.SyntaxKind.VariableDeclaration: {\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const declarationMetadata: DeclarationMetadata =\n this._collector.fetchDeclarationMetadata(astDeclaration);\n\n const hasReadonlyModifier: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Readonly) !== 0;\n const hasReadonlyDocTag: boolean = !!docComment?.modifierTagSet?.hasTagName('@readonly');\n const isGetterWithNoSetter: boolean =\n ts.isGetAccessorDeclaration(astDeclaration.declaration) &&\n declarationMetadata.ancillaryDeclarations.length === 0;\n const isVarConst: boolean =\n ts.isVariableDeclaration(astDeclaration.declaration) &&\n TypeScriptInternals.isVarConst(astDeclaration.declaration);\n\n return hasReadonlyModifier || hasReadonlyDocTag || isGetterWithNoSetter || isVarConst;\n }\n default: {\n // Readonly-ness does not make sense for any other declaration kind.\n return false;\n }\n }\n }\n\n private _getFileUrlPath(declaration: ts.Declaration): string {\n const sourceFile: ts.SourceFile = declaration.getSourceFile();\n const sourceLocation: ISourceLocation = this._collector.sourceMapper.getSourceLocation({\n sourceFile,\n pos: declaration.pos\n });\n\n let result: string = path.relative(\n this._collector.extractorConfig.projectFolder,\n sourceLocation.sourceFilePath\n );\n result = Path.convertToSlashes(result);\n return result;\n }\n}\n"]}
1
+ {"version":3,"file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AAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;QACvC,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAxmCD,8CAwmCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n/* eslint-disable no-bitwise */\n\nimport * as path from 'path';\nimport * as ts from 'typescript';\nimport type * as tsdoc from '@microsoft/tsdoc';\nimport {\n ApiModel,\n ApiClass,\n ApiPackage,\n ApiEntryPoint,\n ApiMethod,\n ApiNamespace,\n ApiInterface,\n ApiPropertySignature,\n type ApiItemContainerMixin,\n ReleaseTag,\n ApiProperty,\n ApiMethodSignature,\n type IApiParameterOptions,\n ApiEnum,\n ApiEnumMember,\n type IExcerptTokenRange,\n type IExcerptToken,\n ApiConstructor,\n ApiConstructSignature,\n ApiFunction,\n ApiIndexSignature,\n ApiVariable,\n ApiTypeAlias,\n ApiCallSignature,\n type IApiTypeParameterOptions,\n EnumMemberOrder\n} from '@microsoft/api-extractor-model';\nimport { Path } from '@rushstack/node-core-library';\n\nimport type { Collector } from '../collector/Collector';\nimport type { ISourceLocation } from '../collector/SourceMapper';\nimport type { AstDeclaration } from '../analyzer/AstDeclaration';\nimport { ExcerptBuilder, type IExcerptBuilderNodeToCapture } from './ExcerptBuilder';\nimport { AstSymbol } from '../analyzer/AstSymbol';\nimport { DeclarationReferenceGenerator } from './DeclarationReferenceGenerator';\nimport type { ApiItemMetadata } from '../collector/ApiItemMetadata';\nimport type { DeclarationMetadata } from '../collector/DeclarationMetadata';\nimport { AstNamespaceImport } from '../analyzer/AstNamespaceImport';\nimport type { AstEntity } from '../analyzer/AstEntity';\nimport type { AstModule } from '../analyzer/AstModule';\nimport { TypeScriptInternals } from '../analyzer/TypeScriptInternals';\nimport type { ExtractorConfig } from '../api/ExtractorConfig';\n\ninterface IProcessAstEntityContext {\n name: string;\n isExported: boolean;\n parentApiItem: ApiItemContainerMixin;\n}\n\n/**\n * @beta\n */\nexport interface IApiModelGenerationOptions {\n /**\n * The release tags to trim.\n */\n releaseTagsToTrim: Set<ReleaseTag>;\n}\n\nexport class ApiModelGenerator {\n private readonly _collector: Collector;\n private readonly _apiModel: ApiModel;\n private readonly _referenceGenerator: DeclarationReferenceGenerator;\n private readonly _releaseTagsToTrim: Set<ReleaseTag> | undefined;\n\n public readonly docModelEnabled: boolean;\n\n public constructor(collector: Collector, extractorConfig: ExtractorConfig) {\n this._collector = collector;\n this._apiModel = new ApiModel();\n this._referenceGenerator = new DeclarationReferenceGenerator(collector);\n\n const apiModelGenerationOptions: IApiModelGenerationOptions | undefined =\n extractorConfig.docModelGenerationOptions;\n if (apiModelGenerationOptions) {\n this._releaseTagsToTrim = apiModelGenerationOptions.releaseTagsToTrim;\n this.docModelEnabled = true;\n } else {\n this.docModelEnabled = false;\n }\n }\n\n public get apiModel(): ApiModel {\n return this._apiModel;\n }\n\n public buildApiPackage(): ApiPackage {\n const packageDocComment: tsdoc.DocComment | undefined = this._collector.workingPackage.tsdocComment;\n\n const apiPackage: ApiPackage = new ApiPackage({\n name: this._collector.workingPackage.name,\n docComment: packageDocComment,\n tsdocConfiguration: this._collector.extractorConfig.tsdocConfiguration,\n projectFolderUrl: this._collector.extractorConfig.projectFolderUrl\n });\n this._apiModel.addMember(apiPackage);\n\n const apiEntryPoint: ApiEntryPoint = new ApiEntryPoint({ name: '' });\n apiPackage.addMember(apiEntryPoint);\n\n for (const entity of this._collector.entities) {\n // Only process entities that are exported from the entry point. Entities that are exported from\n // `AstNamespaceImport` entities will be processed by `_processAstNamespaceImport`. However, if\n // we are including forgotten exports, then process everything.\n if (entity.exportedFromEntryPoint || this._collector.extractorConfig.docModelIncludeForgottenExports) {\n this._processAstEntity(entity.astEntity, {\n name: entity.nameForEmit!,\n isExported: entity.exportedFromEntryPoint,\n parentApiItem: apiEntryPoint\n });\n }\n }\n\n return apiPackage;\n }\n\n private _processAstEntity(astEntity: AstEntity, context: IProcessAstEntityContext): void {\n if (astEntity instanceof AstSymbol) {\n // Skip ancillary declarations; we will process them with the main declaration\n for (const astDeclaration of this._collector.getNonAncillaryDeclarations(astEntity)) {\n this._processDeclaration(astDeclaration, context);\n }\n return;\n }\n\n if (astEntity instanceof AstNamespaceImport) {\n // Note that a single API item can belong to two different AstNamespaceImport namespaces. For example:\n //\n // // file.ts defines \"thing()\"\n // import * as example1 from \"./file\";\n // import * as example2 from \"./file\";\n //\n // // ...so here we end up with example1.thing() and example2.thing()\n // export { example1, example2 }\n //\n // The current logic does not try to associate \"thing()\" with a specific parent. Instead\n // the API documentation will show duplicated entries for example1.thing() and example2.thing().\n //\n // This could be improved in the future, but it requires a stable mechanism for choosing an associated parent.\n // For thoughts about this: https://github.com/microsoft/rushstack/issues/1308\n this._processAstNamespaceImport(astEntity, context);\n return;\n }\n\n // TODO: Figure out how to represent reexported AstImport objects. Basically we need to introduce a new\n // ApiItem subclass for \"export alias\", similar to a type alias, but representing declarations of the\n // form \"export { X } from 'external-package'\". We can also use this to solve GitHub issue #950.\n }\n\n private _processAstNamespaceImport(\n astNamespaceImport: AstNamespaceImport,\n context: IProcessAstEntityContext\n ): void {\n const astModule: AstModule = astNamespaceImport.astModule;\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiNamespace.getContainerKey(name);\n const fileUrlPath: string = this._getFileUrlPath(astNamespaceImport.declaration);\n\n let apiNamespace: ApiNamespace | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiNamespace;\n\n if (apiNamespace === undefined) {\n apiNamespace = new ApiNamespace({\n name,\n docComment: undefined,\n releaseTag: ReleaseTag.None,\n excerptTokens: [],\n isExported,\n fileUrlPath\n });\n parentApiItem.addMember(apiNamespace);\n }\n\n astModule.astModuleExportInfo!.exportedLocalEntities.forEach(\n (exportedEntity: AstEntity, exportedName: string) => {\n this._processAstEntity(exportedEntity, {\n name: exportedName,\n isExported: true,\n parentApiItem: apiNamespace!\n });\n }\n );\n }\n\n private _processDeclaration(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n if ((astDeclaration.modifierFlags & ts.ModifierFlags.Private) !== 0) {\n return; // trim out private declarations\n }\n\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n if (this._releaseTagsToTrim?.has(releaseTag)) {\n return;\n }\n\n switch (astDeclaration.declaration.kind) {\n case ts.SyntaxKind.CallSignature:\n this._processApiCallSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.Constructor:\n this._processApiConstructor(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.ConstructSignature:\n this._processApiConstructSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.ClassDeclaration:\n this._processApiClass(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.EnumDeclaration:\n this._processApiEnum(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.EnumMember:\n this._processApiEnumMember(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.FunctionDeclaration:\n this._processApiFunction(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.GetAccessor:\n this._processApiProperty(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.SetAccessor:\n this._processApiProperty(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.IndexSignature:\n this._processApiIndexSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.InterfaceDeclaration:\n this._processApiInterface(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.MethodDeclaration:\n this._processApiMethod(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.MethodSignature:\n this._processApiMethodSignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.ModuleDeclaration:\n this._processApiNamespace(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.PropertyDeclaration:\n this._processApiProperty(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.PropertySignature:\n this._processApiPropertySignature(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.TypeAliasDeclaration:\n this._processApiTypeAlias(astDeclaration, context);\n break;\n\n case ts.SyntaxKind.VariableDeclaration:\n // check for arrow functions in variable declaration\n const functionDeclaration: ts.FunctionDeclaration | undefined =\n this._tryFindFunctionDeclaration(astDeclaration);\n if (functionDeclaration) {\n this._processApiFunction(astDeclaration, context, functionDeclaration);\n } else {\n this._processApiVariable(astDeclaration, context);\n }\n break;\n\n default:\n // ignore unknown types\n }\n }\n\n private _tryFindFunctionDeclaration(astDeclaration: AstDeclaration): ts.FunctionDeclaration | undefined {\n const children: readonly ts.Node[] = astDeclaration.declaration.getChildren(\n astDeclaration.declaration.getSourceFile()\n );\n return children.find(ts.isFunctionTypeNode) as ts.FunctionDeclaration | undefined;\n }\n\n private _processChildDeclarations(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n for (const childDeclaration of astDeclaration.children) {\n this._processDeclaration(childDeclaration, {\n ...context,\n name: childDeclaration.astSymbol.localName\n });\n }\n }\n\n private _processApiCallSignature(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiCallSignature.getContainerKey(overloadIndex);\n\n let apiCallSignature: ApiCallSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiCallSignature;\n\n if (apiCallSignature === undefined) {\n const callSignature: ts.CallSignatureDeclaration =\n astDeclaration.declaration as ts.CallSignatureDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: callSignature.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n callSignature.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n callSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(callSignature);\n\n apiCallSignature = new ApiCallSignature({\n docComment,\n releaseTag,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiCallSignature);\n }\n }\n\n private _processApiConstructor(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiConstructor.getContainerKey(overloadIndex);\n\n let apiConstructor: ApiConstructor | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiConstructor;\n\n if (apiConstructor === undefined) {\n const constructorDeclaration: ts.ConstructorDeclaration =\n astDeclaration.declaration as ts.ConstructorDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n constructorDeclaration.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isProtected: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Protected) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(constructorDeclaration);\n\n apiConstructor = new ApiConstructor({\n docComment,\n releaseTag,\n isProtected,\n parameters,\n overloadIndex,\n excerptTokens,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiConstructor);\n }\n }\n\n private _processApiClass(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiClass.getContainerKey(name);\n\n let apiClass: ApiClass | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiClass;\n\n if (apiClass === undefined) {\n const classDeclaration: ts.ClassDeclaration = astDeclaration.declaration as ts.ClassDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n classDeclaration.typeParameters\n );\n\n let extendsTokenRange: IExcerptTokenRange | undefined = undefined;\n const implementsTokenRanges: IExcerptTokenRange[] = [];\n\n for (const heritageClause of classDeclaration.heritageClauses || []) {\n if (heritageClause.token === ts.SyntaxKind.ExtendsKeyword) {\n extendsTokenRange = ExcerptBuilder.createEmptyTokenRange();\n if (heritageClause.types.length > 0) {\n nodesToCapture.push({ node: heritageClause.types[0], tokenRange: extendsTokenRange });\n }\n } else if (heritageClause.token === ts.SyntaxKind.ImplementsKeyword) {\n for (const heritageType of heritageClause.types) {\n const implementsTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n implementsTokenRanges.push(implementsTokenRange);\n nodesToCapture.push({ node: heritageType, tokenRange: implementsTokenRange });\n }\n }\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isAbstract: boolean =\n (ts.getCombinedModifierFlags(classDeclaration) & ts.ModifierFlags.Abstract) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(classDeclaration);\n\n apiClass = new ApiClass({\n name,\n isAbstract,\n docComment,\n releaseTag,\n excerptTokens,\n typeParameters,\n extendsTokenRange,\n implementsTokenRanges,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiClass);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiClass\n });\n }\n\n private _processApiConstructSignature(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext\n ): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiConstructSignature.getContainerKey(overloadIndex);\n\n let apiConstructSignature: ApiConstructSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiConstructSignature;\n\n if (apiConstructSignature === undefined) {\n const constructSignature: ts.ConstructSignatureDeclaration =\n astDeclaration.declaration as ts.ConstructSignatureDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: constructSignature.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n constructSignature.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n constructSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(constructSignature);\n\n apiConstructSignature = new ApiConstructSignature({\n docComment,\n releaseTag,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiConstructSignature);\n }\n }\n\n private _processApiEnum(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiEnum.getContainerKey(name);\n\n let apiEnum: ApiEnum | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiEnum;\n\n if (apiEnum === undefined) {\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, []);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const preserveMemberOrder: boolean =\n this._collector.extractorConfig.enumMemberOrder === EnumMemberOrder.Preserve;\n const fileUrlPath: string = this._getFileUrlPath(astDeclaration.declaration);\n\n apiEnum = new ApiEnum({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n preserveMemberOrder,\n isExported,\n fileUrlPath\n });\n parentApiItem.addMember(apiEnum);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiEnum\n });\n }\n\n private _processApiEnumMember(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, parentApiItem } = context;\n const containerKey: string = ApiEnumMember.getContainerKey(name);\n\n let apiEnumMember: ApiEnumMember | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiEnumMember;\n\n if (apiEnumMember === undefined) {\n const enumMember: ts.EnumMember = astDeclaration.declaration as ts.EnumMember;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n let initializerTokenRange: IExcerptTokenRange | undefined = undefined;\n if (enumMember.initializer) {\n initializerTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: enumMember.initializer, tokenRange: initializerTokenRange });\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(enumMember);\n\n apiEnumMember = new ApiEnumMember({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n initializerTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiEnumMember);\n }\n }\n\n private _processApiFunction(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext,\n altFunctionDeclaration?: ts.FunctionDeclaration\n ): void {\n const { name, isExported, parentApiItem } = context;\n\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiFunction.getContainerKey(name, overloadIndex);\n\n let apiFunction: ApiFunction | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiFunction;\n\n if (apiFunction === undefined) {\n const functionDeclaration: ts.FunctionDeclaration =\n altFunctionDeclaration ?? (astDeclaration.declaration as ts.FunctionDeclaration);\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: functionDeclaration.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n functionDeclaration.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n functionDeclaration.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(functionDeclaration);\n\n apiFunction = new ApiFunction({\n name,\n docComment,\n releaseTag,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiFunction);\n }\n }\n\n private _processApiIndexSignature(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiIndexSignature.getContainerKey(overloadIndex);\n\n let apiIndexSignature: ApiIndexSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiIndexSignature;\n\n if (apiIndexSignature === undefined) {\n const indexSignature: ts.IndexSignatureDeclaration =\n astDeclaration.declaration as ts.IndexSignatureDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: indexSignature.type, tokenRange: returnTypeTokenRange });\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n indexSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(indexSignature);\n\n apiIndexSignature = new ApiIndexSignature({\n docComment,\n releaseTag,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n isReadonly,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiIndexSignature);\n }\n }\n\n private _processApiInterface(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiInterface.getContainerKey(name);\n\n let apiInterface: ApiInterface | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiInterface;\n\n if (apiInterface === undefined) {\n const interfaceDeclaration: ts.InterfaceDeclaration =\n astDeclaration.declaration as ts.InterfaceDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n interfaceDeclaration.typeParameters\n );\n\n const extendsTokenRanges: IExcerptTokenRange[] = [];\n\n for (const heritageClause of interfaceDeclaration.heritageClauses || []) {\n if (heritageClause.token === ts.SyntaxKind.ExtendsKeyword) {\n for (const heritageType of heritageClause.types) {\n const extendsTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n extendsTokenRanges.push(extendsTokenRange);\n nodesToCapture.push({ node: heritageType, tokenRange: extendsTokenRange });\n }\n }\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(interfaceDeclaration);\n\n apiInterface = new ApiInterface({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n typeParameters,\n extendsTokenRanges,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiInterface);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiInterface\n });\n }\n\n private _processApiMethod(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, parentApiItem } = context;\n const isStatic: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Static) !== 0;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiMethod.getContainerKey(name, isStatic, overloadIndex);\n\n let apiMethod: ApiMethod | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiMethod;\n\n if (apiMethod === undefined) {\n const methodDeclaration: ts.MethodDeclaration = astDeclaration.declaration as ts.MethodDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: methodDeclaration.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n methodDeclaration.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n methodDeclaration.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n if (releaseTag === ReleaseTag.Internal || releaseTag === ReleaseTag.Alpha) {\n return; // trim out items marked as \"@internal\" or \"@alpha\"\n }\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const isProtected: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Protected) !== 0;\n const isAbstract: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Abstract) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(methodDeclaration);\n\n apiMethod = new ApiMethod({\n name,\n isAbstract,\n docComment,\n releaseTag,\n isProtected,\n isStatic,\n isOptional,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiMethod);\n }\n }\n\n private _processApiMethodSignature(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext\n ): void {\n const { name, parentApiItem } = context;\n const overloadIndex: number = this._collector.getOverloadIndex(astDeclaration);\n const containerKey: string = ApiMethodSignature.getContainerKey(name, overloadIndex);\n\n let apiMethodSignature: ApiMethodSignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiMethodSignature;\n\n if (apiMethodSignature === undefined) {\n const methodSignature: ts.MethodSignature = astDeclaration.declaration as ts.MethodSignature;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const returnTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: methodSignature.type, tokenRange: returnTypeTokenRange });\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n methodSignature.typeParameters\n );\n\n const parameters: IApiParameterOptions[] = this._captureParameters(\n nodesToCapture,\n methodSignature.parameters\n );\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const fileUrlPath: string = this._getFileUrlPath(methodSignature);\n\n apiMethodSignature = new ApiMethodSignature({\n name,\n docComment,\n releaseTag,\n isOptional,\n typeParameters,\n parameters,\n overloadIndex,\n excerptTokens,\n returnTypeTokenRange,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiMethodSignature);\n }\n }\n\n private _processApiNamespace(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n const containerKey: string = ApiNamespace.getContainerKey(name);\n\n let apiNamespace: ApiNamespace | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiNamespace;\n\n if (apiNamespace === undefined) {\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, []);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(astDeclaration.declaration);\n\n apiNamespace = new ApiNamespace({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n isExported,\n fileUrlPath\n });\n parentApiItem.addMember(apiNamespace);\n }\n\n this._processChildDeclarations(astDeclaration, {\n ...context,\n parentApiItem: apiNamespace\n });\n }\n\n private _processApiProperty(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, parentApiItem } = context;\n const isStatic: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Static) !== 0;\n const containerKey: string = ApiProperty.getContainerKey(name, isStatic);\n\n let apiProperty: ApiProperty | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiProperty;\n\n if (apiProperty === undefined) {\n const declaration: ts.Declaration = astDeclaration.declaration;\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const propertyTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n let propertyTypeNode: ts.TypeNode | undefined;\n\n if (ts.isPropertyDeclaration(declaration) || ts.isGetAccessorDeclaration(declaration)) {\n propertyTypeNode = declaration.type;\n }\n\n if (ts.isSetAccessorDeclaration(declaration)) {\n // Note that TypeScript always reports an error if a setter does not have exactly one parameter.\n propertyTypeNode = declaration.parameters[0].type;\n }\n\n nodesToCapture.push({ node: propertyTypeNode, tokenRange: propertyTypeTokenRange });\n\n let initializerTokenRange: IExcerptTokenRange | undefined = undefined;\n if (ts.isPropertyDeclaration(declaration) && declaration.initializer) {\n initializerTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: declaration.initializer, tokenRange: initializerTokenRange });\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const isProtected: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Protected) !== 0;\n const isAbstract: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Abstract) !== 0;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(declaration);\n\n apiProperty = new ApiProperty({\n name,\n docComment,\n releaseTag,\n isAbstract,\n isProtected,\n isStatic,\n isOptional,\n isReadonly,\n excerptTokens,\n propertyTypeTokenRange,\n initializerTokenRange,\n fileUrlPath\n });\n parentApiItem.addMember(apiProperty);\n } else {\n // If the property was already declared before (via a merged interface declaration),\n // we assume its signature is identical, because the language requires that.\n }\n }\n\n private _processApiPropertySignature(\n astDeclaration: AstDeclaration,\n context: IProcessAstEntityContext\n ): void {\n const { name, parentApiItem } = context;\n const containerKey: string = ApiPropertySignature.getContainerKey(name);\n\n let apiPropertySignature: ApiPropertySignature | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiPropertySignature;\n\n if (apiPropertySignature === undefined) {\n const propertySignature: ts.PropertySignature = astDeclaration.declaration as ts.PropertySignature;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const propertyTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: propertySignature.type, tokenRange: propertyTypeTokenRange });\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isOptional: boolean =\n (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(propertySignature);\n\n apiPropertySignature = new ApiPropertySignature({\n name,\n docComment,\n releaseTag,\n isOptional,\n excerptTokens,\n propertyTypeTokenRange,\n isReadonly,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiPropertySignature);\n } else {\n // If the property was already declared before (via a merged interface declaration),\n // we assume its signature is identical, because the language requires that.\n }\n }\n\n private _processApiTypeAlias(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n\n const containerKey: string = ApiTypeAlias.getContainerKey(name);\n\n let apiTypeAlias: ApiTypeAlias | undefined = parentApiItem.tryGetMemberByKey(\n containerKey\n ) as ApiTypeAlias;\n\n if (apiTypeAlias === undefined) {\n const typeAliasDeclaration: ts.TypeAliasDeclaration =\n astDeclaration.declaration as ts.TypeAliasDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(\n nodesToCapture,\n typeAliasDeclaration.typeParameters\n );\n\n const typeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: typeAliasDeclaration.type, tokenRange: typeTokenRange });\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const fileUrlPath: string = this._getFileUrlPath(typeAliasDeclaration);\n\n apiTypeAlias = new ApiTypeAlias({\n name,\n docComment,\n typeParameters,\n releaseTag,\n excerptTokens,\n typeTokenRange,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiTypeAlias);\n }\n }\n\n private _processApiVariable(astDeclaration: AstDeclaration, context: IProcessAstEntityContext): void {\n const { name, isExported, parentApiItem } = context;\n\n const containerKey: string = ApiVariable.getContainerKey(name);\n\n let apiVariable: ApiVariable | undefined = parentApiItem.tryGetMemberByKey(containerKey) as ApiVariable;\n\n if (apiVariable === undefined) {\n const variableDeclaration: ts.VariableDeclaration =\n astDeclaration.declaration as ts.VariableDeclaration;\n\n const nodesToCapture: IExcerptBuilderNodeToCapture[] = [];\n\n const variableTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: variableDeclaration.type, tokenRange: variableTypeTokenRange });\n\n let initializerTokenRange: IExcerptTokenRange | undefined = undefined;\n if (variableDeclaration.initializer) {\n initializerTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: variableDeclaration.initializer, tokenRange: initializerTokenRange });\n }\n\n const excerptTokens: IExcerptToken[] = this._buildExcerptTokens(astDeclaration, nodesToCapture);\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag;\n const isReadonly: boolean = this._isReadonly(astDeclaration);\n const fileUrlPath: string = this._getFileUrlPath(variableDeclaration);\n\n apiVariable = new ApiVariable({\n name,\n docComment,\n releaseTag,\n excerptTokens,\n variableTypeTokenRange,\n initializerTokenRange,\n isReadonly,\n isExported,\n fileUrlPath\n });\n\n parentApiItem.addMember(apiVariable);\n }\n }\n\n /**\n * @param nodesToCapture - A list of child nodes whose token ranges we want to capture\n */\n private _buildExcerptTokens(\n astDeclaration: AstDeclaration,\n nodesToCapture: IExcerptBuilderNodeToCapture[]\n ): IExcerptToken[] {\n const excerptTokens: IExcerptToken[] = [];\n\n // Build the main declaration\n ExcerptBuilder.addDeclaration(excerptTokens, astDeclaration, nodesToCapture, this._referenceGenerator);\n\n const declarationMetadata: DeclarationMetadata = this._collector.fetchDeclarationMetadata(astDeclaration);\n\n // Add any ancillary declarations\n for (const ancillaryDeclaration of declarationMetadata.ancillaryDeclarations) {\n ExcerptBuilder.addBlankLine(excerptTokens);\n ExcerptBuilder.addDeclaration(\n excerptTokens,\n ancillaryDeclaration,\n nodesToCapture,\n this._referenceGenerator\n );\n }\n\n return excerptTokens;\n }\n\n private _captureTypeParameters(\n nodesToCapture: IExcerptBuilderNodeToCapture[],\n typeParameterNodes: ts.NodeArray<ts.TypeParameterDeclaration> | undefined\n ): IApiTypeParameterOptions[] {\n const typeParameters: IApiTypeParameterOptions[] = [];\n if (typeParameterNodes) {\n for (const typeParameter of typeParameterNodes) {\n const constraintTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: typeParameter.constraint, tokenRange: constraintTokenRange });\n\n const defaultTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: typeParameter.default, tokenRange: defaultTypeTokenRange });\n\n typeParameters.push({\n typeParameterName: typeParameter.name.getText().trim(),\n constraintTokenRange,\n defaultTypeTokenRange\n });\n }\n }\n return typeParameters;\n }\n\n private _captureParameters(\n nodesToCapture: IExcerptBuilderNodeToCapture[],\n parameterNodes: ts.NodeArray<ts.ParameterDeclaration>\n ): IApiParameterOptions[] {\n const parameters: IApiParameterOptions[] = [];\n for (const parameter of parameterNodes) {\n const parameterTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();\n nodesToCapture.push({ node: parameter.type, tokenRange: parameterTypeTokenRange });\n parameters.push({\n parameterName: parameter.name.getText().trim(),\n parameterTypeTokenRange,\n isOptional: this._collector.typeChecker.isOptionalParameter(parameter)\n });\n }\n return parameters;\n }\n\n private _isReadonly(astDeclaration: AstDeclaration): boolean {\n switch (astDeclaration.declaration.kind) {\n case ts.SyntaxKind.GetAccessor:\n case ts.SyntaxKind.IndexSignature:\n case ts.SyntaxKind.PropertyDeclaration:\n case ts.SyntaxKind.PropertySignature:\n case ts.SyntaxKind.SetAccessor:\n case ts.SyntaxKind.VariableDeclaration: {\n const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);\n const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment;\n const declarationMetadata: DeclarationMetadata =\n this._collector.fetchDeclarationMetadata(astDeclaration);\n\n const hasReadonlyModifier: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Readonly) !== 0;\n const hasReadonlyDocTag: boolean = !!docComment?.modifierTagSet?.hasTagName('@readonly');\n const isGetterWithNoSetter: boolean =\n ts.isGetAccessorDeclaration(astDeclaration.declaration) &&\n declarationMetadata.ancillaryDeclarations.length === 0;\n const isVarConst: boolean =\n ts.isVariableDeclaration(astDeclaration.declaration) &&\n TypeScriptInternals.isVarConst(astDeclaration.declaration);\n\n return hasReadonlyModifier || hasReadonlyDocTag || isGetterWithNoSetter || isVarConst;\n }\n default: {\n // Readonly-ness does not make sense for any other declaration kind.\n return false;\n }\n }\n }\n\n private _getFileUrlPath(declaration: ts.Declaration): string {\n const sourceFile: ts.SourceFile = declaration.getSourceFile();\n const sourceLocation: ISourceLocation = this._collector.sourceMapper.getSourceLocation({\n sourceFile,\n pos: declaration.pos\n });\n\n let result: string = path.relative(\n this._collector.extractorConfig.projectFolder,\n sourceLocation.sourceFilePath\n );\n result = Path.convertToSlashes(result);\n return result;\n }\n}\n"]}
@@ -34,17 +34,6 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  return result;
35
35
  };
36
36
  })();
37
- var __rest = (this && this.__rest) || function (s, e) {
38
- var t = {};
39
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
40
- t[p] = s[p];
41
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
42
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
43
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
44
- t[p[i]] = s[p[i]];
45
- }
46
- return t;
47
- };
48
37
  Object.defineProperty(exports, "__esModule", { value: true });
49
38
  exports.ApiReportGenerator = void 0;
50
39
  const ts = __importStar(require("typescript"));
@@ -472,7 +461,7 @@ class ApiReportGenerator {
472
461
  // Note that the ordering we handle the standard tags is important for backwards compatibility.
473
462
  // Also note that we had special mechanisms for checking whether or not an item is documented with these tags,
474
463
  // so they are checked specially.
475
- const _d = collector.extractorConfig.tagsToReport, { '@sealed': reportSealedTag, '@virtual': reportVirtualTag, '@override': reportOverrideTag, '@eventProperty': reportEventPropertyTag, '@deprecated': reportDeprecatedTag } = _d, otherTagsToReport = __rest(_d, ['@sealed', '@virtual', '@override', '@eventProperty', '@deprecated']);
464
+ const { '@sealed': reportSealedTag, '@virtual': reportVirtualTag, '@override': reportOverrideTag, '@eventProperty': reportEventPropertyTag, '@deprecated': reportDeprecatedTag, ...otherTagsToReport } = collector.extractorConfig.tagsToReport;
476
465
  // 2.a Check for standard tags and report those that are both configured and present in the metadata.
477
466
  if (reportSealedTag && apiItemMetadata.isSealed) {
478
467
  footerParts.push('@sealed');