@microsoft/api-extractor-model 7.30.9 → 7.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/CHANGELOG.json +29 -0
  2. package/CHANGELOG.md +13 -1
  3. package/dist/tsdoc-metadata.json +1 -1
  4. package/lib/items/ApiDeclaredItem.d.ts.map +1 -1
  5. package/lib/items/ApiDeclaredItem.js.map +1 -1
  6. package/lib/items/ApiDocumentedItem.d.ts.map +1 -1
  7. package/lib/items/ApiDocumentedItem.js.map +1 -1
  8. package/lib/items/ApiItem.d.ts.map +1 -1
  9. package/lib/items/ApiItem.js +1 -1
  10. package/lib/items/ApiItem.js.map +1 -1
  11. package/lib/mixins/ApiExportedMixin.d.ts.map +1 -1
  12. package/lib/mixins/ApiExportedMixin.js.map +1 -1
  13. package/lib/mixins/ApiInitializerMixin.d.ts.map +1 -1
  14. package/lib/mixins/ApiInitializerMixin.js +2 -1
  15. package/lib/mixins/ApiInitializerMixin.js.map +1 -1
  16. package/lib/mixins/ApiItemContainerMixin.d.ts.map +1 -1
  17. package/lib/mixins/ApiItemContainerMixin.js +1 -1
  18. package/lib/mixins/ApiItemContainerMixin.js.map +1 -1
  19. package/lib/mixins/ApiParameterListMixin.d.ts.map +1 -1
  20. package/lib/mixins/ApiParameterListMixin.js +2 -1
  21. package/lib/mixins/ApiParameterListMixin.js.map +1 -1
  22. package/lib/mixins/ApiReturnTypeMixin.d.ts.map +1 -1
  23. package/lib/mixins/ApiReturnTypeMixin.js +2 -1
  24. package/lib/mixins/ApiReturnTypeMixin.js.map +1 -1
  25. package/lib/mixins/ApiTypeParameterListMixin.d.ts.map +1 -1
  26. package/lib/mixins/ApiTypeParameterListMixin.js +2 -1
  27. package/lib/mixins/ApiTypeParameterListMixin.js.map +1 -1
  28. package/lib/model/ApiCallSignature.d.ts.map +1 -1
  29. package/lib/model/ApiCallSignature.js.map +1 -1
  30. package/lib/model/ApiClass.d.ts.map +1 -1
  31. package/lib/model/ApiClass.js.map +1 -1
  32. package/lib/model/ApiConstructSignature.d.ts.map +1 -1
  33. package/lib/model/ApiConstructSignature.js.map +1 -1
  34. package/lib/model/ApiConstructor.d.ts.map +1 -1
  35. package/lib/model/ApiConstructor.js.map +1 -1
  36. package/lib/model/ApiEntryPoint.d.ts.map +1 -1
  37. package/lib/model/ApiEntryPoint.js.map +1 -1
  38. package/lib/model/ApiEnum.d.ts.map +1 -1
  39. package/lib/model/ApiEnum.js.map +1 -1
  40. package/lib/model/ApiEnumMember.d.ts.map +1 -1
  41. package/lib/model/ApiEnumMember.js.map +1 -1
  42. package/lib/model/ApiFunction.d.ts.map +1 -1
  43. package/lib/model/ApiFunction.js.map +1 -1
  44. package/lib/model/ApiIndexSignature.d.ts.map +1 -1
  45. package/lib/model/ApiIndexSignature.js.map +1 -1
  46. package/lib/model/ApiInterface.d.ts.map +1 -1
  47. package/lib/model/ApiInterface.js.map +1 -1
  48. package/lib/model/ApiMethod.d.ts.map +1 -1
  49. package/lib/model/ApiMethod.js.map +1 -1
  50. package/lib/model/ApiMethodSignature.d.ts.map +1 -1
  51. package/lib/model/ApiMethodSignature.js.map +1 -1
  52. package/lib/model/ApiModel.d.ts +1 -1
  53. package/lib/model/ApiModel.d.ts.map +1 -1
  54. package/lib/model/ApiModel.js +2 -2
  55. package/lib/model/ApiModel.js.map +1 -1
  56. package/lib/model/ApiNamespace.d.ts.map +1 -1
  57. package/lib/model/ApiNamespace.js.map +1 -1
  58. package/lib/model/ApiPackage.d.ts +2 -2
  59. package/lib/model/ApiPackage.d.ts.map +1 -1
  60. package/lib/model/ApiPackage.js +3 -3
  61. package/lib/model/ApiPackage.js.map +1 -1
  62. package/lib/model/ApiProperty.d.ts.map +1 -1
  63. package/lib/model/ApiProperty.js.map +1 -1
  64. package/lib/model/ApiPropertySignature.d.ts.map +1 -1
  65. package/lib/model/ApiPropertySignature.js.map +1 -1
  66. package/lib/model/ApiTypeAlias.d.ts.map +1 -1
  67. package/lib/model/ApiTypeAlias.js.map +1 -1
  68. package/lib/model/ApiVariable.d.ts.map +1 -1
  69. package/lib/model/ApiVariable.js.map +1 -1
  70. package/lib/model/ModelReferenceResolver.d.ts.map +1 -1
  71. package/lib/model/ModelReferenceResolver.js.map +1 -1
  72. package/lib/model/SourceLocation.js +2 -2
  73. package/lib/model/SourceLocation.js.map +1 -1
  74. package/package.json +3 -3
package/CHANGELOG.json CHANGED
@@ -1,6 +1,35 @@
1
1
  {
2
2
  "name": "@microsoft/api-extractor-model",
3
3
  "entries": [
4
+ {
5
+ "version": "7.31.1",
6
+ "tag": "@microsoft/api-extractor-model_v7.31.1",
7
+ "date": "Wed, 08 Oct 2025 00:13:29 GMT",
8
+ "comments": {
9
+ "dependency": [
10
+ {
11
+ "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.17.0`"
12
+ }
13
+ ]
14
+ }
15
+ },
16
+ {
17
+ "version": "7.31.0",
18
+ "tag": "@microsoft/api-extractor-model_v7.31.0",
19
+ "date": "Fri, 03 Oct 2025 20:09:59 GMT",
20
+ "comments": {
21
+ "minor": [
22
+ {
23
+ "comment": "Normalize import of builtin modules to use the `node:` protocol."
24
+ }
25
+ ],
26
+ "dependency": [
27
+ {
28
+ "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.16.0`"
29
+ }
30
+ ]
31
+ }
32
+ },
4
33
  {
5
34
  "version": "7.30.9",
6
35
  "tag": "@microsoft/api-extractor-model_v7.30.9",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,18 @@
1
1
  # Change Log - @microsoft/api-extractor-model
2
2
 
3
- This log was last generated on Tue, 30 Sep 2025 23:57:45 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 08 Oct 2025 00:13:29 GMT and should not be manually modified.
4
+
5
+ ## 7.31.1
6
+ Wed, 08 Oct 2025 00:13:29 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 7.31.0
11
+ Fri, 03 Oct 2025 20:09:59 GMT
12
+
13
+ ### Minor changes
14
+
15
+ - Normalize import of builtin modules to use the `node:` protocol.
4
16
 
5
17
  ## 7.30.9
6
18
  Tue, 30 Sep 2025 23:57:45 GMT
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.52.11"
8
+ "packageVersion": "7.52.15"
9
9
  }
10
10
  ]
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ApiDeclaredItem.d.ts","sourceRoot":"","sources":["../../src/items/ApiDeclaredItem.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC/B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,yBAAyB;IACxE,aAAa,EAAE,aAAa,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,oBAAqB,SAAQ,sBAAsB;IAClE,aAAa,EAAE,aAAa,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,eAAgB,SAAQ,iBAAiB;IACpD,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,eAAe,CAAC,CAAiB;gBAEtB,OAAO,EAAE,uBAAuB;IAcnD,gBAAgB;WACF,iBAAiB,CAC7B,OAAO,EAAE,OAAO,CAAC,uBAAuB,CAAC,EACzC,OAAO,EAAE,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AAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC;YACpE,CAAC;YACD,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC,CAAC;QAEH,iGAAiG;QACjG,0DAA0D;QAC1D,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,YAAY,eAAe,CAAC,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;gBAC9F,UAAU,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;YAC5C,CAAC;QACH,CAAC;IACH,CAAC;IAED;;OAEG;IACI,YAAY,CAAC,UAA8B;QAChD,OAAO,IAAI,iBAAO,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IACrD,CAAC;IAED;;OAEG;IACK,oBAAoB;;QAC1B,MAAM,gBAAgB,GAAuB,MAAA,IAAI,CAAC,oBAAoB,EAAE,0CAAE,gBAAgB,CAAC;QAE3F,IAAI,WAA+B,CAAC;QACpC,KAAK,IAAI,OAAO,GAAwB,IAAI,EAAE,OAAO,KAAK,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;YAC9F,IAAI,OAAO,YAAY,eAAe,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;gBAC9D,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;gBAClC,MAAM;YACR,CAAC;QACH,CAAC;QAED,OAAO,IAAI,+BAAc,CAAC;YACxB,gBAAgB,EAAE,gBAAgB;YAClC,WAAW,EAAE,WAAW;SACzB,CAAC,CAAC;IACL,CAAC;CACF;AA7ID,0CA6IC","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 { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport {\n ApiDocumentedItem,\n type IApiDocumentedItemJson,\n type IApiDocumentedItemOptions\n} from './ApiDocumentedItem';\nimport type { ApiItem } from './ApiItem';\nimport { Excerpt, ExcerptToken, type IExcerptTokenRange, type IExcerptToken } from '../mixins/Excerpt';\nimport type { DeserializerContext } from '../model/DeserializerContext';\nimport { SourceLocation } from '../model/SourceLocation';\n\n/**\n * Constructor options for {@link ApiDeclaredItem}.\n * @public\n */\nexport interface IApiDeclaredItemOptions extends IApiDocumentedItemOptions {\n excerptTokens: IExcerptToken[];\n fileUrlPath?: string;\n}\n\nexport interface IApiDeclaredItemJson extends IApiDocumentedItemJson {\n excerptTokens: IExcerptToken[];\n fileUrlPath?: string;\n}\n\n/**\n * The base class for API items that have an associated source code excerpt containing a TypeScript declaration.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * Most `ApiItem` subclasses have declarations and thus extend `ApiDeclaredItem`. Counterexamples include\n * `ApiModel` and `ApiPackage`, which do not have any corresponding TypeScript source code.\n *\n * @public\n */\nexport class ApiDeclaredItem extends ApiDocumentedItem {\n private _excerptTokens: ExcerptToken[];\n private _excerpt: Excerpt;\n private _fileUrlPath?: string;\n private _sourceLocation?: SourceLocation;\n\n public constructor(options: IApiDeclaredItemOptions) {\n super(options);\n\n this._excerptTokens = options.excerptTokens.map((token) => {\n const canonicalReference: DeclarationReference | undefined =\n token.canonicalReference === undefined\n ? undefined\n : DeclarationReference.parse(token.canonicalReference);\n return new ExcerptToken(token.kind, token.text, canonicalReference);\n });\n this._excerpt = new Excerpt(this.excerptTokens, { startIndex: 0, endIndex: this.excerptTokens.length });\n this._fileUrlPath = options.fileUrlPath;\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiDeclaredItemOptions>,\n context: DeserializerContext,\n jsonObject: IApiDeclaredItemJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.excerptTokens = jsonObject.excerptTokens;\n options.fileUrlPath = jsonObject.fileUrlPath;\n }\n\n /**\n * The source code excerpt where the API item is declared.\n */\n public get excerpt(): Excerpt {\n return this._excerpt;\n }\n\n /**\n * The individual source code tokens that comprise the main excerpt.\n */\n public get excerptTokens(): ReadonlyArray<ExcerptToken> {\n return this._excerptTokens;\n }\n\n /**\n * The file URL path relative to the `projectFolder` and `projectFolderURL` fields\n * as defined in the `api-extractor.json` config. Is `undefined` if the path is\n * the same as the parent API item's.\n */\n public get fileUrlPath(): string | undefined {\n return this._fileUrlPath;\n }\n\n /**\n * Returns the source location where the API item is declared.\n */\n public get sourceLocation(): SourceLocation {\n if (!this._sourceLocation) {\n this._sourceLocation = this._buildSourceLocation();\n }\n return this._sourceLocation;\n }\n\n /**\n * If the API item has certain important modifier tags such as `@sealed`, `@virtual`, or `@override`,\n * this prepends them as a doc comment above the excerpt.\n */\n public getExcerptWithModifiers(): string {\n const excerpt: string = this.excerpt.text;\n const modifierTags: string[] = [];\n\n if (excerpt.length > 0) {\n if (this instanceof ApiDocumentedItem) {\n if (this.tsdocComment) {\n if (this.tsdocComment.modifierTagSet.isSealed()) {\n modifierTags.push('@sealed');\n }\n if (this.tsdocComment.modifierTagSet.isVirtual()) {\n modifierTags.push('@virtual');\n }\n if (this.tsdocComment.modifierTagSet.isOverride()) {\n modifierTags.push('@override');\n }\n }\n if (modifierTags.length > 0) {\n return '/** ' + modifierTags.join(' ') + ' */\\n' + excerpt;\n }\n }\n }\n\n return excerpt;\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiDeclaredItemJson>): void {\n super.serializeInto(jsonObject);\n jsonObject.excerptTokens = this.excerptTokens.map((x) => {\n const excerptToken: IExcerptToken = { kind: x.kind, text: x.text };\n if (x.canonicalReference !== undefined) {\n excerptToken.canonicalReference = x.canonicalReference.toString();\n }\n return excerptToken;\n });\n\n // Only serialize this API item's file URL path if it exists and it's different from its parent's\n // (a little optimization to keep the doc model succinct).\n if (this.fileUrlPath) {\n if (!(this.parent instanceof ApiDeclaredItem) || this.fileUrlPath !== this.parent.fileUrlPath) {\n jsonObject.fileUrlPath = this.fileUrlPath;\n }\n }\n }\n\n /**\n * Constructs a new {@link Excerpt} corresponding to the provided token range.\n */\n public buildExcerpt(tokenRange: IExcerptTokenRange): Excerpt {\n return new Excerpt(this.excerptTokens, tokenRange);\n }\n\n /**\n * Builds the cached object used by the `sourceLocation` property.\n */\n private _buildSourceLocation(): SourceLocation {\n const projectFolderUrl: string | undefined = this.getAssociatedPackage()?.projectFolderUrl;\n\n let fileUrlPath: string | undefined;\n for (let current: ApiItem | undefined = this; current !== undefined; current = current.parent) {\n if (current instanceof ApiDeclaredItem && current.fileUrlPath) {\n fileUrlPath = current.fileUrlPath;\n break;\n }\n }\n\n return new SourceLocation({\n projectFolderUrl: projectFolderUrl,\n fileUrlPath: fileUrlPath\n });\n }\n}\n"]}
1
+ {"version":3,"file":"ApiDeclaredItem.js","sourceRoot":"","sources":["../../src/items/ApiDeclaredItem.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAA+F;AAE/F,2DAI6B;AAE7B,+CAAuG;AAEvG,4DAAyD;AAgBzD;;;;;;;;;;;;GAYG;AACH,MAAa,eAAgB,SAAQ,qCAAiB;IAMpD,YAAmB,OAAgC;QACjD,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACxD,MAAM,kBAAkB,GACtB,KAAK,CAAC,kBAAkB,KAAK,SAAS;gBACpC,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,2CAAoB,CAAC,KAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;YAC3D,OAAO,IAAI,sBAAY,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;QACtE,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,iBAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,UAAU,EA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U,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;YAC5C,CAAC;QACH,CAAC;IACH,CAAC;IAED;;OAEG;IACI,YAAY,CAAC,UAA8B;QAChD,OAAO,IAAI,iBAAO,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IACrD,CAAC;IAED;;OAEG;IACK,oBAAoB;;QAC1B,MAAM,gBAAgB,GAAuB,MAAA,IAAI,CAAC,oBAAoB,EAAE,0CAAE,gBAAgB,CAAC;QAE3F,IAAI,WAA+B,CAAC;QACpC,KAAK,IAAI,OAAO,GAAwB,IAAI,EAAE,OAAO,KAAK,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;YAC9F,IAAI,OAAO,YAAY,eAAe,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;gBAC9D,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;gBAClC,MAAM;YACR,CAAC;QACH,CAAC;QAED,OAAO,IAAI,+BAAc,CAAC;YACxB,gBAAgB,EAAE,gBAAgB;YAClC,WAAW,EAAE,WAAW;SACzB,CAAC,CAAC;IACL,CAAC;CACF;AA7ID,0CA6IC","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 { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\n\nimport {\n ApiDocumentedItem,\n type IApiDocumentedItemJson,\n type IApiDocumentedItemOptions\n} from './ApiDocumentedItem';\nimport type { ApiItem } from './ApiItem';\nimport { Excerpt, ExcerptToken, type IExcerptTokenRange, type IExcerptToken } from '../mixins/Excerpt';\nimport type { DeserializerContext } from '../model/DeserializerContext';\nimport { SourceLocation } from '../model/SourceLocation';\n\n/**\n * Constructor options for {@link ApiDeclaredItem}.\n * @public\n */\nexport interface IApiDeclaredItemOptions extends IApiDocumentedItemOptions {\n excerptTokens: IExcerptToken[];\n fileUrlPath?: string;\n}\n\nexport interface IApiDeclaredItemJson extends IApiDocumentedItemJson {\n excerptTokens: IExcerptToken[];\n fileUrlPath?: string;\n}\n\n/**\n * The base class for API items that have an associated source code excerpt containing a TypeScript declaration.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * Most `ApiItem` subclasses have declarations and thus extend `ApiDeclaredItem`. Counterexamples include\n * `ApiModel` and `ApiPackage`, which do not have any corresponding TypeScript source code.\n *\n * @public\n */\nexport class ApiDeclaredItem extends ApiDocumentedItem {\n private _excerptTokens: ExcerptToken[];\n private _excerpt: Excerpt;\n private _fileUrlPath?: string;\n private _sourceLocation?: SourceLocation;\n\n public constructor(options: IApiDeclaredItemOptions) {\n super(options);\n\n this._excerptTokens = options.excerptTokens.map((token) => {\n const canonicalReference: DeclarationReference | undefined =\n token.canonicalReference === undefined\n ? undefined\n : DeclarationReference.parse(token.canonicalReference);\n return new ExcerptToken(token.kind, token.text, canonicalReference);\n });\n this._excerpt = new Excerpt(this.excerptTokens, { startIndex: 0, endIndex: this.excerptTokens.length });\n this._fileUrlPath = options.fileUrlPath;\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiDeclaredItemOptions>,\n context: DeserializerContext,\n jsonObject: IApiDeclaredItemJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.excerptTokens = jsonObject.excerptTokens;\n options.fileUrlPath = jsonObject.fileUrlPath;\n }\n\n /**\n * The source code excerpt where the API item is declared.\n */\n public get excerpt(): Excerpt {\n return this._excerpt;\n }\n\n /**\n * The individual source code tokens that comprise the main excerpt.\n */\n public get excerptTokens(): ReadonlyArray<ExcerptToken> {\n return this._excerptTokens;\n }\n\n /**\n * The file URL path relative to the `projectFolder` and `projectFolderURL` fields\n * as defined in the `api-extractor.json` config. Is `undefined` if the path is\n * the same as the parent API item's.\n */\n public get fileUrlPath(): string | undefined {\n return this._fileUrlPath;\n }\n\n /**\n * Returns the source location where the API item is declared.\n */\n public get sourceLocation(): SourceLocation {\n if (!this._sourceLocation) {\n this._sourceLocation = this._buildSourceLocation();\n }\n return this._sourceLocation;\n }\n\n /**\n * If the API item has certain important modifier tags such as `@sealed`, `@virtual`, or `@override`,\n * this prepends them as a doc comment above the excerpt.\n */\n public getExcerptWithModifiers(): string {\n const excerpt: string = this.excerpt.text;\n const modifierTags: string[] = [];\n\n if (excerpt.length > 0) {\n if (this instanceof ApiDocumentedItem) {\n if (this.tsdocComment) {\n if (this.tsdocComment.modifierTagSet.isSealed()) {\n modifierTags.push('@sealed');\n }\n if (this.tsdocComment.modifierTagSet.isVirtual()) {\n modifierTags.push('@virtual');\n }\n if (this.tsdocComment.modifierTagSet.isOverride()) {\n modifierTags.push('@override');\n }\n }\n if (modifierTags.length > 0) {\n return '/** ' + modifierTags.join(' ') + ' */\\n' + excerpt;\n }\n }\n }\n\n return excerpt;\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiDeclaredItemJson>): void {\n super.serializeInto(jsonObject);\n jsonObject.excerptTokens = this.excerptTokens.map((x) => {\n const excerptToken: IExcerptToken = { kind: x.kind, text: x.text };\n if (x.canonicalReference !== undefined) {\n excerptToken.canonicalReference = x.canonicalReference.toString();\n }\n return excerptToken;\n });\n\n // Only serialize this API item's file URL path if it exists and it's different from its parent's\n // (a little optimization to keep the doc model succinct).\n if (this.fileUrlPath) {\n if (!(this.parent instanceof ApiDeclaredItem) || this.fileUrlPath !== this.parent.fileUrlPath) {\n jsonObject.fileUrlPath = this.fileUrlPath;\n }\n }\n }\n\n /**\n * Constructs a new {@link Excerpt} corresponding to the provided token range.\n */\n public buildExcerpt(tokenRange: IExcerptTokenRange): Excerpt {\n return new Excerpt(this.excerptTokens, tokenRange);\n }\n\n /**\n * Builds the cached object used by the `sourceLocation` property.\n */\n private _buildSourceLocation(): SourceLocation {\n const projectFolderUrl: string | undefined = this.getAssociatedPackage()?.projectFolderUrl;\n\n let fileUrlPath: string | undefined;\n for (let current: ApiItem | undefined = this; current !== undefined; current = current.parent) {\n if (current instanceof ApiDeclaredItem && current.fileUrlPath) {\n fileUrlPath = current.fileUrlPath;\n break;\n }\n }\n\n return new SourceLocation({\n projectFolderUrl: projectFolderUrl,\n fileUrlPath: fileUrlPath\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiDocumentedItem.d.ts","sourceRoot":"","sources":["../../src/items/ApiDocumentedItem.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,eAAe;IAChE,UAAU,EAAE,KAAK,CAAC,UAAU,GAAG,SAAS,CAAC;CAC1C;AAED,MAAM,WAAW,sBAAuB,SAAQ,YAAY;IAC1D,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,qBAAa,iBAAkB,SAAQ,OAAO;IAC5C,OAAO,CAAC,aAAa,CAA+B;gBAEjC,OAAO,EAAE,yBAAyB;IAKrD,gBAAgB;WACF,iBAAiB,CAC7B,OAAO,EAAE,OAAO,CAAC,yBAAyB,CAAC,EAC3C,OAAO,EAAE,mBAAmB,EAC5B,UAAU,EAAE,YAAY,GACvB,IAAI;IAkBP,IAAW,YAAY,IAAI,KAAK,CAAC,UAAU,GAAG,SAAS,CAEtD;IAED,gBAAgB;IACT,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAAG,IAAI;CAQxE"}
1
+ {"version":3,"file":"ApiDocumentedItem.d.ts","sourceRoot":"","sources":["../../src/items/ApiDocumentedItem.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,KAAK,eAAe,EAAE,KA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EtD,MAAM,cAAc,GAA2B,UAAoC,CAAC;QAEpF,IAAI,cAAc,CAAC,UAAU,EAAE,CAAC;YAC9B,MAAM,WAAW,GAAsB,IAAI,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;YAEzF,8EAA8E;YAC9E,2FAA2F;YAC3F,gGAAgG;YAChG,8EAA8E;YAC9E,MAAM,aAAa,GAAwB,WAAW,CAAC,WAAW,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;YAE9F,OAAO,CAAC,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC;QAChD,CAAC;IACH,CAAC;IAED,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,gBAAgB;IACT,aAAa,CAAC,UAA2C;QAC9D,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAChC,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;YACpC,UAAU,CAAC,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;QAC1D,CAAC;aAAM,CAAC;YACN,UAAU,CAAC,UAAU,GAAG,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC;CACF;AA5CD,8CA4CC","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 tsdoc from '@microsoft/tsdoc';\nimport { ApiItem, type IApiItemOptions, type IApiItemJson } from './ApiItem';\nimport type { DeserializerContext } from '../model/DeserializerContext';\n\n/**\n * Constructor options for {@link ApiDocumentedItem}.\n * @public\n */\nexport interface IApiDocumentedItemOptions extends IApiItemOptions {\n docComment: tsdoc.DocComment | undefined;\n}\n\nexport interface IApiDocumentedItemJson extends IApiItemJson {\n docComment: string;\n}\n\n/**\n * An abstract base class for API declarations that can have an associated TSDoc comment.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * @public\n */\nexport class ApiDocumentedItem extends ApiItem {\n private _tsdocComment: tsdoc.DocComment | undefined;\n\n public constructor(options: IApiDocumentedItemOptions) {\n super(options);\n this._tsdocComment = options.docComment;\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiDocumentedItemOptions>,\n context: DeserializerContext,\n jsonObject: IApiItemJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n const documentedJson: IApiDocumentedItemJson = jsonObject as IApiDocumentedItemJson;\n\n if (documentedJson.docComment) {\n const tsdocParser: tsdoc.TSDocParser = new tsdoc.TSDocParser(context.tsdocConfiguration);\n\n // NOTE: For now, we ignore TSDoc errors found in a serialized .api.json file.\n // Normally these errors would have already been reported by API Extractor during analysis.\n // However, they could also arise if the JSON file was edited manually, or if the file was saved\n // using a different release of the software that used an incompatible syntax.\n const parserContext: tsdoc.ParserContext = tsdocParser.parseString(documentedJson.docComment);\n\n options.docComment = parserContext.docComment;\n }\n }\n\n public get tsdocComment(): tsdoc.DocComment | undefined {\n return this._tsdocComment;\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiDocumentedItemJson>): void {\n super.serializeInto(jsonObject);\n if (this.tsdocComment !== undefined) {\n jsonObject.docComment = this.tsdocComment.emitAsTsdoc();\n } else {\n jsonObject.docComment = '';\n }\n }\n}\n"]}
1
+ {"version":3,"file":"ApiDocumentedItem.js","sourceRoot":"","sources":["../../src/items/ApiDocumentedItem.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,wDAA0C;AAE1C,uCAA6E;AAe7E;;;;;;;;;GASG;AACH,MAAa,iBAAkB,SAAQ,iBAAO;IAG5C,YAAmB,OAAkC;QACnD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC;IAC1C,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,iBAAiB,CAC7B,OAA2C,EAC3C,OAA4B,EAC5B,UAAwB;QAExB,KAAK,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAEtD,MAAM,cAAc,GAA2B,UAAoC,CAAC;QAEpF,IAAI,cAAc,CAAC,UAAU,EAAE,CAAC;YAC9B,MAAM,WAAW,GAAsB,IAAI,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;YAEzF,8EAA8E;YAC9E,2FAA2F;YAC3F,gGAAgG;YAChG,8EAA8E;YAC9E,MAAM,aAAa,GAAwB,WAAW,CAAC,WAAW,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;YAE9F,OAAO,CAAC,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC;QAChD,CAAC;IACH,CAAC;IAED,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,gBAAgB;IACT,aAAa,CAAC,UAA2C;QAC9D,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAChC,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;YACpC,UAAU,CAAC,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;QAC1D,CAAC;aAAM,CAAC;YACN,UAAU,CAAC,UAAU,GAAG,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC;CACF;AA5CD,8CA4CC","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 tsdoc from '@microsoft/tsdoc';\n\nimport { ApiItem, type IApiItemOptions, type IApiItemJson } from './ApiItem';\nimport type { DeserializerContext } from '../model/DeserializerContext';\n\n/**\n * Constructor options for {@link ApiDocumentedItem}.\n * @public\n */\nexport interface IApiDocumentedItemOptions extends IApiItemOptions {\n docComment: tsdoc.DocComment | undefined;\n}\n\nexport interface IApiDocumentedItemJson extends IApiItemJson {\n docComment: string;\n}\n\n/**\n * An abstract base class for API declarations that can have an associated TSDoc comment.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * @public\n */\nexport class ApiDocumentedItem extends ApiItem {\n private _tsdocComment: tsdoc.DocComment | undefined;\n\n public constructor(options: IApiDocumentedItemOptions) {\n super(options);\n this._tsdocComment = options.docComment;\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiDocumentedItemOptions>,\n context: DeserializerContext,\n jsonObject: IApiItemJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n const documentedJson: IApiDocumentedItemJson = jsonObject as IApiDocumentedItemJson;\n\n if (documentedJson.docComment) {\n const tsdocParser: tsdoc.TSDocParser = new tsdoc.TSDocParser(context.tsdocConfiguration);\n\n // NOTE: For now, we ignore TSDoc errors found in a serialized .api.json file.\n // Normally these errors would have already been reported by API Extractor during analysis.\n // However, they could also arise if the JSON file was edited manually, or if the file was saved\n // using a different release of the software that used an incompatible syntax.\n const parserContext: tsdoc.ParserContext = tsdocParser.parseString(documentedJson.docComment);\n\n options.docComment = parserContext.docComment;\n }\n }\n\n public get tsdocComment(): tsdoc.DocComment | undefined {\n return this._tsdocComment;\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiDocumentedItemJson>): void {\n super.serializeInto(jsonObject);\n if (this.tsdocComment !== undefined) {\n jsonObject.docComment = this.tsdocComment.emitAsTsdoc();\n } else {\n jsonObject.docComment = '';\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiItem.d.ts","sourceRoot":"","sources":["../../src/items/ApiItem.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yDAAyD,CAAC;AACpG,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEt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W,IAAI,MAAM,CAc/B;IAED;;;;;OAKG;IACH,IAAW,MAAM,IAAI,OAAO,GAAG,SAAS,CAEvC;IAED;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,CAAC,OAAO,CAAC,CAE3C;IAED;;;;;;;;;OASG;IACI,iBAAiB,IAAI,aAAa,CAAC,OAAO,CAAC;IAQlD;;OAEG;IACI,YAAY,IAAI,aAAa,CAAC,OAAO,CAAC;IAS7C;;;;;;OAMG;IACI,0BAA0B,IAAI,MAAM;IAiC3C;;;OAGG;IACI,oBAAoB,IAAI,UAAU,GAAG,SAAS;IASrD;;;OAGG;IACI,kBAAkB,IAAI,QAAQ,GAAG,SAAS;IASjD;;;;;;;;;;OAUG;IACI,UAAU,IAAI,MAAM;IAI3B;;;;;;;OAOG;IACI,CAAC,uBAAuB,CAAC,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI;IAKnE;;;OAGG;IACH,SAAS,CAAC,uBAAuB,IAAI,oBAAoB;CAG1D;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAoB,SAAQ,WAAW,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC;CAAG"}
@@ -3,8 +3,8 @@
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.ApiItem = exports.apiItem_onParentChanged = exports.ApiItemKind = void 0;
6
- const ApiParameterListMixin_1 = require("../mixins/ApiParameterListMixin");
7
6
  const node_core_library_1 = require("@rushstack/node-core-library");
7
+ const ApiParameterListMixin_1 = require("../mixins/ApiParameterListMixin");
8
8
  const ApiItemContainerMixin_1 = require("../mixins/ApiItemContainerMixin");
9
9
  /**
10
10
  * The type returned by the {@link ApiItem.kind} property, which can be used to easily distinguish subclasses of
@@ -1 +1 @@
1
- {"version":3,"file":"ApiItem.js","sourceRoot":"","sources":["../../src/items/ApiItem.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;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AC,mEAAmE,CAAC,CAAC;IAC/F,CAAC;CACF;AAzPD,0BAyPC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport type { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport type { Constructor, PropertiesOf } from '../mixins/Mixin';\nimport type { ApiPackage } from '../model/ApiPackage';\nimport { ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\nimport type { DeserializerContext } from '../model/DeserializerContext';\nimport { InternalError } from '@rushstack/node-core-library';\nimport { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin';\nimport type { ApiModel } from '../model/ApiModel';\n\n/**\n * The type returned by the {@link ApiItem.kind} property, which can be used to easily distinguish subclasses of\n * {@link ApiItem}.\n *\n * @public\n */\nexport enum ApiItemKind {\n CallSignature = 'CallSignature',\n Class = 'Class',\n Constructor = 'Constructor',\n ConstructSignature = 'ConstructSignature',\n EntryPoint = 'EntryPoint',\n Enum = 'Enum',\n EnumMember = 'EnumMember',\n Function = 'Function',\n IndexSignature = 'IndexSignature',\n Interface = 'Interface',\n Method = 'Method',\n MethodSignature = 'MethodSignature',\n Model = 'Model',\n Namespace = 'Namespace',\n Package = 'Package',\n Property = 'Property',\n PropertySignature = 'PropertySignature',\n TypeAlias = 'TypeAlias',\n Variable = 'Variable',\n None = 'None'\n}\n\n/**\n * Constructor options for {@link ApiItem}.\n * @public\n */\nexport interface IApiItemOptions {}\n\nexport interface IApiItemJson {\n kind: ApiItemKind;\n canonicalReference: string;\n}\n\n// PRIVATE - Allows ApiItemContainerMixin to assign the parent.\n//\nexport const apiItem_onParentChanged: unique symbol = Symbol('ApiItem._onAddToContainer');\n\n/**\n * The abstract base class for all members of an `ApiModel` object.\n *\n * @remarks\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n * @public\n */\nexport class ApiItem {\n private _canonicalReference: DeclarationReference | undefined;\n private _parent: ApiItem | undefined;\n\n public constructor(options: IApiItemOptions) {\n // (\"options\" is not used here, but part of the inheritance pattern)\n }\n\n public static deserialize(jsonObject: IApiItemJson, context: DeserializerContext): ApiItem {\n // The Deserializer class is coupled with a ton of other classes, so we delay loading it\n // to avoid ES5 circular imports.\n const deserializerModule: typeof import('../model/Deserializer') = require('../model/Deserializer');\n return deserializerModule.Deserializer.deserialize(context, jsonObject);\n }\n\n /** @virtual */\n public static onDeserializeInto(\n options: Partial<IApiItemOptions>,\n context: DeserializerContext,\n jsonObject: IApiItemJson\n ): void {\n // (implemented by subclasses)\n }\n\n /** @virtual */\n public serializeInto(jsonObject: Partial<IApiItemJson>): void {\n jsonObject.kind = this.kind;\n jsonObject.canonicalReference = this.canonicalReference.toString();\n }\n\n /**\n * Identifies the subclass of the `ApiItem` base class.\n * @virtual\n */\n public get kind(): ApiItemKind {\n throw new Error('ApiItem.kind was not implemented by the child class');\n }\n\n /**\n * Warning: This API is used internally by API extractor but is not yet ready for general usage.\n *\n * @remarks\n *\n * Returns a `DeclarationReference` object using the experimental new declaration reference notation.\n *\n * @beta\n */\n public get canonicalReference(): DeclarationReference {\n if (!this._canonicalReference) {\n try {\n this._canonicalReference = this.buildCanonicalReference();\n } catch (e) {\n const name: string = this.getScopedNameWithinPackage() || this.displayName;\n throw new InternalError(`Error building canonical reference for ${name}:\\n` + (e as Error).message);\n }\n }\n return this._canonicalReference;\n }\n\n /**\n * Returns a string key that can be used to efficiently retrieve an `ApiItem` from an `ApiItemContainerMixin`.\n * The key is unique within the container. Its format is undocumented and may change at any time.\n *\n * @remarks\n * Use the `getContainerKey()` static member to construct the key. Each subclass has a different implementation\n * of this function, according to the aspects that are important for identifying it.\n *\n * @virtual\n */\n public get containerKey(): string {\n throw new InternalError('ApiItem.containerKey was not implemented by the child class');\n }\n\n /**\n * Returns a name for this object that can be used in diagnostic messages, for example.\n *\n * @remarks\n * For an object that inherits ApiNameMixin, this will return the declared name (e.g. the name of a TypeScript\n * function). Otherwise, it will return a string such as \"(call signature)\" or \"(model)\".\n *\n * @virtual\n */\n public get displayName(): string {\n switch (this.kind) {\n case ApiItemKind.CallSignature:\n return '(call)';\n case ApiItemKind.Constructor:\n return '(constructor)';\n case ApiItemKind.ConstructSignature:\n return '(new)';\n case ApiItemKind.IndexSignature:\n return '(indexer)';\n case ApiItemKind.Model:\n return '(model)';\n }\n return '(???)'; // All other types should inherit ApiNameMixin which will override this property\n }\n\n /**\n * If this item was added to a ApiItemContainerMixin item, then this returns the container item.\n * If this is an Parameter that was added to a method or function, then this returns the function item.\n * Otherwise, it returns undefined.\n * @virtual\n */\n public get parent(): ApiItem | undefined {\n return this._parent;\n }\n\n /**\n * This property supports a visitor pattern for walking the tree.\n * For items with ApiItemContainerMixin, it returns the contained items, sorted alphabetically.\n * Otherwise it returns an empty array.\n * @virtual\n */\n public get members(): ReadonlyArray<ApiItem> {\n return [];\n }\n\n /**\n * If this item has a name (i.e. extends `ApiNameMixin`), then return all items that have the same parent\n * and the same name. Otherwise, return all items that have the same parent and the same `ApiItemKind`.\n *\n * @remarks\n * Examples: For a function, this would return all overloads for the function. For a constructor, this would\n * return all overloads for the constructor. For a merged declaration (e.g. a `namespace` and `enum` with the\n * same name), this would return both declarations. If this item does not have a parent, or if it is the only\n * item of its name/kind, then the result is an array containing only this item.\n */\n public getMergedSiblings(): ReadonlyArray<ApiItem> {\n const parent: ApiItem | undefined = this._parent;\n if (parent && ApiItemContainerMixin.isBaseClassOf(parent)) {\n return parent._getMergedSiblingsForMember(this);\n }\n return [];\n }\n\n /**\n * Returns the chain of ancestors, starting from the root of the tree, and ending with the this item.\n */\n public getHierarchy(): ReadonlyArray<ApiItem> {\n const hierarchy: ApiItem[] = [];\n for (let current: ApiItem | undefined = this; current !== undefined; current = current.parent) {\n hierarchy.push(current);\n }\n hierarchy.reverse();\n return hierarchy;\n }\n\n /**\n * This returns a scoped name such as `\"Namespace1.Namespace2.MyClass.myMember()\"`. It does not include the\n * package name or entry point.\n *\n * @remarks\n * If called on an ApiEntrypoint, ApiPackage, or ApiModel item, the result is an empty string.\n */\n public getScopedNameWithinPackage(): string {\n const reversedParts: string[] = [];\n\n for (let current: ApiItem | undefined = this; current !== undefined; current = current.parent) {\n if (\n current.kind === ApiItemKind.Model ||\n current.kind === ApiItemKind.Package ||\n current.kind === ApiItemKind.EntryPoint\n ) {\n break;\n }\n if (reversedParts.length !== 0) {\n reversedParts.push('.');\n } else {\n switch (current.kind) {\n case ApiItemKind.CallSignature:\n case ApiItemKind.ConstructSignature:\n case ApiItemKind.Constructor:\n case ApiItemKind.IndexSignature:\n // These functional forms don't have a proper name, so we don't append the \"()\" suffix\n break;\n default:\n if (ApiParameterListMixin.isBaseClassOf(current)) {\n reversedParts.push('()');\n }\n }\n }\n reversedParts.push(current.displayName);\n }\n\n return reversedParts.reverse().join('');\n }\n\n /**\n * If this item is an ApiPackage or has an ApiPackage as one of its parents, then that object is returned.\n * Otherwise undefined is returned.\n */\n public getAssociatedPackage(): ApiPackage | undefined {\n for (let current: ApiItem | undefined = this; current !== undefined; current = current.parent) {\n if (current.kind === ApiItemKind.Package) {\n return current as ApiPackage;\n }\n }\n return undefined;\n }\n\n /**\n * If this item is an ApiModel or has an ApiModel as one of its parents, then that object is returned.\n * Otherwise undefined is returned.\n */\n public getAssociatedModel(): ApiModel | undefined {\n for (let current: ApiItem | undefined = this; current !== undefined; current = current.parent) {\n if (current.kind === ApiItemKind.Model) {\n return current as ApiModel;\n }\n }\n return undefined;\n }\n\n /**\n * A text string whose value determines the sort order that is automatically applied by the\n * {@link (ApiItemContainerMixin:interface)} class.\n *\n * @remarks\n * The value of this string is undocumented and may change at any time.\n * If {@link (ApiItemContainerMixin:interface).preserveMemberOrder} is enabled for the `ApiItem`'s parent,\n * then no sorting is performed, and this key is not used.\n *\n * @virtual\n */\n public getSortKey(): string {\n return this.containerKey;\n }\n\n /**\n * PRIVATE\n *\n * @privateRemarks\n * Allows ApiItemContainerMixin to assign the parent when the item is added to a container.\n *\n * @internal\n */\n public [apiItem_onParentChanged](parent: ApiItem | undefined): void {\n this._parent = parent;\n this._canonicalReference = undefined;\n }\n\n /**\n * Builds the cached object used by the `canonicalReference` property.\n * @virtual\n */\n protected buildCanonicalReference(): DeclarationReference {\n throw new InternalError('ApiItem.canonicalReference was not implemented by the child class');\n }\n}\n\n/**\n * This abstraction is used by the mixin pattern.\n * It describes a class type that inherits from {@link ApiItem}.\n *\n * @public\n */\nexport interface IApiItemConstructor extends Constructor<ApiItem>, PropertiesOf<typeof ApiItem> {}\n"]}
1
+ {"version":3,"file":"ApiItem.js","sourceRoot":"","sources":["../../src/items/ApiItem.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,oEAA6D;AAI7D,2EAAwE;AAExE,2EAAwE;AAGxE;;;;;GAKG;AACH,IAAY,WAqBX;AArBD,WAAY,WAAW;IACrB,8CAA+B,CAAA;IAC/B,8BAAe,CAAA;IACf,0CAA2B,CAAA;IAC3B,wDAAyC,CAAA;IACzC,wCAAyB,CAAA;IACzB,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,oCAAqB,CAAA;IACrB,gDAAiC,CAAA;IACjC,sCAAuB,CAAA;IACvB,gCAAiB,CAAA;IACjB,kDAAmC,CAAA;IACnC,8BAAe,CAAA;IACf,sCAAuB,CAAA;IACvB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;IACrB,sDAAuC,CAAA;IACvC,sCAAuB,CAAA;IACvB,oCAAqB,CAAA;IACrB,4BAAa,CAAA;AACf,CAAC,EArBW,WAAW,2BAAX,WAAW,QAqBtB;AAaD,+DAA+D;AAC/D,EAAE;AACW,QAAA,uBAAuB,GAAkB,MAAM,CAAC,2BAA2B,CAAC,CAAC;AAE1F;;;;;;;GAOG;AACH,MAAa,OAAO;IAIlB,YAAmB,OAAwB;QACzC,oEAAoE;IACtE,CAAC;IAEM,MAAM,CAAC,WAAW,CAAC,UAAwB,EAAE,OAA4B;QAC9E,yFAAyF;QACzF,iCAAi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OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,KAAK,EAAE,CAAC;gBACvC,OAAO,OAAmB,CAAC;YAC7B,CAAC;QACH,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;;;;;;;;OAUG;IACI,UAAU;QACf,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;;;;;;;OAOG;IACI,CAAC,+BAAuB,CAAC,CAAC,MAA2B;QAC1D,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,mBAAmB,GAAG,SAAS,CAAC;IACvC,CAAC;IAED;;;OAGG;IACO,uBAAuB;QAC/B,MAAM,IAAI,iCAAa,CAAC,mEAAmE,CAAC,CAAC;IAC/F,CAAC;CACF;AAzPD,0BAyPC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport type { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport { InternalError } from '@rushstack/node-core-library';\n\nimport type { Constructor, PropertiesOf } from '../mixins/Mixin';\nimport type { ApiPackage } from '../model/ApiPackage';\nimport { ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\nimport type { DeserializerContext } from '../model/DeserializerContext';\nimport { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin';\nimport type { ApiModel } from '../model/ApiModel';\n\n/**\n * The type returned by the {@link ApiItem.kind} property, which can be used to easily distinguish subclasses of\n * {@link ApiItem}.\n *\n * @public\n */\nexport enum ApiItemKind {\n CallSignature = 'CallSignature',\n Class = 'Class',\n Constructor = 'Constructor',\n ConstructSignature = 'ConstructSignature',\n EntryPoint = 'EntryPoint',\n Enum = 'Enum',\n EnumMember = 'EnumMember',\n Function = 'Function',\n IndexSignature = 'IndexSignature',\n Interface = 'Interface',\n Method = 'Method',\n MethodSignature = 'MethodSignature',\n Model = 'Model',\n Namespace = 'Namespace',\n Package = 'Package',\n Property = 'Property',\n PropertySignature = 'PropertySignature',\n TypeAlias = 'TypeAlias',\n Variable = 'Variable',\n None = 'None'\n}\n\n/**\n * Constructor options for {@link ApiItem}.\n * @public\n */\nexport interface IApiItemOptions {}\n\nexport interface IApiItemJson {\n kind: ApiItemKind;\n canonicalReference: string;\n}\n\n// PRIVATE - Allows ApiItemContainerMixin to assign the parent.\n//\nexport const apiItem_onParentChanged: unique symbol = Symbol('ApiItem._onAddToContainer');\n\n/**\n * The abstract base class for all members of an `ApiModel` object.\n *\n * @remarks\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n * @public\n */\nexport class ApiItem {\n private _canonicalReference: DeclarationReference | undefined;\n private _parent: ApiItem | undefined;\n\n public constructor(options: IApiItemOptions) {\n // (\"options\" is not used here, but part of the inheritance pattern)\n }\n\n public static deserialize(jsonObject: IApiItemJson, context: DeserializerContext): ApiItem {\n // The Deserializer class is coupled with a ton of other classes, so we delay loading it\n // to avoid ES5 circular imports.\n const deserializerModule: typeof import('../model/Deserializer') = require('../model/Deserializer');\n return deserializerModule.Deserializer.deserialize(context, jsonObject);\n }\n\n /** @virtual */\n public static onDeserializeInto(\n options: Partial<IApiItemOptions>,\n context: DeserializerContext,\n jsonObject: IApiItemJson\n ): void {\n // (implemented by subclasses)\n }\n\n /** @virtual */\n public serializeInto(jsonObject: Partial<IApiItemJson>): void {\n jsonObject.kind = this.kind;\n jsonObject.canonicalReference = this.canonicalReference.toString();\n }\n\n /**\n * Identifies the subclass of the `ApiItem` base class.\n * @virtual\n */\n public get kind(): ApiItemKind {\n throw new Error('ApiItem.kind was not implemented by the child class');\n }\n\n /**\n * Warning: This API is used internally by API extractor but is not yet ready for general usage.\n *\n * @remarks\n *\n * Returns a `DeclarationReference` object using the experimental new declaration reference notation.\n *\n * @beta\n */\n public get canonicalReference(): DeclarationReference {\n if (!this._canonicalReference) {\n try {\n this._canonicalReference = this.buildCanonicalReference();\n } catch (e) {\n const name: string = this.getScopedNameWithinPackage() || this.displayName;\n throw new InternalError(`Error building canonical reference for ${name}:\\n` + (e as Error).message);\n }\n }\n return this._canonicalReference;\n }\n\n /**\n * Returns a string key that can be used to efficiently retrieve an `ApiItem` from an `ApiItemContainerMixin`.\n * The key is unique within the container. Its format is undocumented and may change at any time.\n *\n * @remarks\n * Use the `getContainerKey()` static member to construct the key. Each subclass has a different implementation\n * of this function, according to the aspects that are important for identifying it.\n *\n * @virtual\n */\n public get containerKey(): string {\n throw new InternalError('ApiItem.containerKey was not implemented by the child class');\n }\n\n /**\n * Returns a name for this object that can be used in diagnostic messages, for example.\n *\n * @remarks\n * For an object that inherits ApiNameMixin, this will return the declared name (e.g. the name of a TypeScript\n * function). Otherwise, it will return a string such as \"(call signature)\" or \"(model)\".\n *\n * @virtual\n */\n public get displayName(): string {\n switch (this.kind) {\n case ApiItemKind.CallSignature:\n return '(call)';\n case ApiItemKind.Constructor:\n return '(constructor)';\n case ApiItemKind.ConstructSignature:\n return '(new)';\n case ApiItemKind.IndexSignature:\n return '(indexer)';\n case ApiItemKind.Model:\n return '(model)';\n }\n return '(???)'; // All other types should inherit ApiNameMixin which will override this property\n }\n\n /**\n * If this item was added to a ApiItemContainerMixin item, then this returns the container item.\n * If this is an Parameter that was added to a method or function, then this returns the function item.\n * Otherwise, it returns undefined.\n * @virtual\n */\n public get parent(): ApiItem | undefined {\n return this._parent;\n }\n\n /**\n * This property supports a visitor pattern for walking the tree.\n * For items with ApiItemContainerMixin, it returns the contained items, sorted alphabetically.\n * Otherwise it returns an empty array.\n * @virtual\n */\n public get members(): ReadonlyArray<ApiItem> {\n return [];\n }\n\n /**\n * If this item has a name (i.e. extends `ApiNameMixin`), then return all items that have the same parent\n * and the same name. Otherwise, return all items that have the same parent and the same `ApiItemKind`.\n *\n * @remarks\n * Examples: For a function, this would return all overloads for the function. For a constructor, this would\n * return all overloads for the constructor. For a merged declaration (e.g. a `namespace` and `enum` with the\n * same name), this would return both declarations. If this item does not have a parent, or if it is the only\n * item of its name/kind, then the result is an array containing only this item.\n */\n public getMergedSiblings(): ReadonlyArray<ApiItem> {\n const parent: ApiItem | undefined = this._parent;\n if (parent && ApiItemContainerMixin.isBaseClassOf(parent)) {\n return parent._getMergedSiblingsForMember(this);\n }\n return [];\n }\n\n /**\n * Returns the chain of ancestors, starting from the root of the tree, and ending with the this item.\n */\n public getHierarchy(): ReadonlyArray<ApiItem> {\n const hierarchy: ApiItem[] = [];\n for (let current: ApiItem | undefined = this; current !== undefined; current = current.parent) {\n hierarchy.push(current);\n }\n hierarchy.reverse();\n return hierarchy;\n }\n\n /**\n * This returns a scoped name such as `\"Namespace1.Namespace2.MyClass.myMember()\"`. It does not include the\n * package name or entry point.\n *\n * @remarks\n * If called on an ApiEntrypoint, ApiPackage, or ApiModel item, the result is an empty string.\n */\n public getScopedNameWithinPackage(): string {\n const reversedParts: string[] = [];\n\n for (let current: ApiItem | undefined = this; current !== undefined; current = current.parent) {\n if (\n current.kind === ApiItemKind.Model ||\n current.kind === ApiItemKind.Package ||\n current.kind === ApiItemKind.EntryPoint\n ) {\n break;\n }\n if (reversedParts.length !== 0) {\n reversedParts.push('.');\n } else {\n switch (current.kind) {\n case ApiItemKind.CallSignature:\n case ApiItemKind.ConstructSignature:\n case ApiItemKind.Constructor:\n case ApiItemKind.IndexSignature:\n // These functional forms don't have a proper name, so we don't append the \"()\" suffix\n break;\n default:\n if (ApiParameterListMixin.isBaseClassOf(current)) {\n reversedParts.push('()');\n }\n }\n }\n reversedParts.push(current.displayName);\n }\n\n return reversedParts.reverse().join('');\n }\n\n /**\n * If this item is an ApiPackage or has an ApiPackage as one of its parents, then that object is returned.\n * Otherwise undefined is returned.\n */\n public getAssociatedPackage(): ApiPackage | undefined {\n for (let current: ApiItem | undefined = this; current !== undefined; current = current.parent) {\n if (current.kind === ApiItemKind.Package) {\n return current as ApiPackage;\n }\n }\n return undefined;\n }\n\n /**\n * If this item is an ApiModel or has an ApiModel as one of its parents, then that object is returned.\n * Otherwise undefined is returned.\n */\n public getAssociatedModel(): ApiModel | undefined {\n for (let current: ApiItem | undefined = this; current !== undefined; current = current.parent) {\n if (current.kind === ApiItemKind.Model) {\n return current as ApiModel;\n }\n }\n return undefined;\n }\n\n /**\n * A text string whose value determines the sort order that is automatically applied by the\n * {@link (ApiItemContainerMixin:interface)} class.\n *\n * @remarks\n * The value of this string is undocumented and may change at any time.\n * If {@link (ApiItemContainerMixin:interface).preserveMemberOrder} is enabled for the `ApiItem`'s parent,\n * then no sorting is performed, and this key is not used.\n *\n * @virtual\n */\n public getSortKey(): string {\n return this.containerKey;\n }\n\n /**\n * PRIVATE\n *\n * @privateRemarks\n * Allows ApiItemContainerMixin to assign the parent when the item is added to a container.\n *\n * @internal\n */\n public [apiItem_onParentChanged](parent: ApiItem | undefined): void {\n this._parent = parent;\n this._canonicalReference = undefined;\n }\n\n /**\n * Builds the cached object used by the `canonicalReference` property.\n * @virtual\n */\n protected buildCanonicalReference(): DeclarationReference {\n throw new InternalError('ApiItem.canonicalReference was not implemented by the child class');\n }\n}\n\n/**\n * This abstraction is used by the mixin pattern.\n * It describes a class type that inherits from {@link ApiItem}.\n *\n * @public\n */\nexport interface IApiItemConstructor extends Constructor<ApiItem>, PropertiesOf<typeof ApiItem> {}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiExportedMixin.d.ts","sourceRoot":"","sources":["../../src/mixins/ApiExportedMixin.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGpG;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,eAAe;IAC/D,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,UAAU,EAAE,OAAO,CAAC;CACrB;AAID;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,gBAAiB,SAAQ,OAAO;IAC/C;;;;;;;;;;;;;;;;;;;;;;;;;OAy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ED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;GAGG;AACH,WAAiB,gBAAgB;IAC/B;;;;;;;;OAQG;IACH,SAAgB,aAAa,CAAC,OAAgB;QAC5C,OAAO,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC7C,CAAC;IAFe,8BAAa,gBAE5B,CAAA;AACH,CAAC,EAbgB,gBAAgB,gCAAhB,gBAAgB,QAahC","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 @typescript-eslint/no-redeclare */\n\nimport { DeclarationReference, Navigation } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport type { ApiItem, IApiItemJson, IApiItemConstructor, IApiItemOptions } from '../items/ApiItem';\nimport type { DeserializerContext } from '../model/DeserializerContext';\n\n/**\n * Constructor options for {@link (IApiExportedMixinOptions:interface)}.\n * @public\n */\nexport interface IApiExportedMixinOptions extends IApiItemOptions {\n isExported: boolean;\n}\n\nexport interface IApiExportedMixinJson extends IApiItemJson {\n isExported: boolean;\n}\n\nconst _isExported: unique symbol = Symbol('ApiExportedMixin._isExported');\n\n/**\n * The mixin base class for API items that can be exported.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations. The non-abstract classes (e.g. `ApiClass`, `ApiEnum`, `ApiInterface`, etc.) use\n * TypeScript \"mixin\" functions (e.g. `ApiDeclaredItem`, `ApiItemContainerMixin`, etc.) to add various\n * features that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class\n * to extend more than one base class). The \"mixin\" is a TypeScript merged declaration with three components:\n * the function that generates a subclass, an interface that describes the members of the subclass, and\n * a namespace containing static members of the class.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ApiExportedMixin extends ApiItem {\n /**\n * Whether the declaration is exported from its parent item container (i.e. either an `ApiEntryPoint` or an\n * `ApiNamespace`).\n *\n * @remarks\n * Suppose `index.ts` is your entry point:\n *\n * ```ts\n * // index.ts\n *\n * export class A {}\n * class B {}\n *\n * namespace n {\n * export class C {}\n * class D {}\n * }\n *\n * // file.ts\n * export class E {}\n * ```\n *\n * Classes `A` and `C` are both exported, while classes `B`, `D`, and `E` are not. `E` is exported from its\n * local file, but not from its parent item container (i.e. the entry point).\n *\n */\n readonly isExported: boolean;\n\n /** @override */\n serializeInto(jsonObject: Partial<IApiItemJson>): void;\n}\n\n/**\n * Mixin function for {@link (ApiExportedMixin:interface)}.\n *\n * @param baseClass - The base class to be extended\n * @returns A child class that extends baseClass, adding the {@link (ApiExportedMixin:interface)} functionality.\n *\n * @public\n */\nexport function ApiExportedMixin<TBaseClass extends IApiItemConstructor>(\n baseClass: TBaseClass\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): TBaseClass & (new (...args: any[]) => ApiExportedMixin) {\n class MixedClass extends baseClass implements ApiExportedMixin {\n public [_isExported]: boolean;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(...args: any[]) {\n super(...args);\n\n const options: IApiExportedMixinOptions = args[0];\n this[_isExported] = options.isExported;\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiExportedMixinOptions>,\n context: DeserializerContext,\n jsonObject: IApiExportedMixinJson\n ): void {\n baseClass.onDeserializeInto(options, context, jsonObject);\n\n const declarationReference: DeclarationReference = DeclarationReference.parse(\n jsonObject.canonicalReference\n );\n options.isExported = declarationReference.navigation === Navigation.Exports;\n }\n\n public get isExported(): boolean {\n return this[_isExported];\n }\n\n /**\n * The `isExported` property is intentionally not serialized because the information is already present\n * in the item's `canonicalReference`.\n * @override\n */\n public serializeInto(jsonObject: Partial<IApiExportedMixinJson>): void {\n super.serializeInto(jsonObject);\n }\n }\n\n return MixedClass;\n}\n\n/**\n * Static members for {@link (ApiExportedMixin:interface)}.\n * @public\n */\nexport namespace ApiExportedMixin {\n /**\n * A type guard that tests whether the specified `ApiItem` subclass extends the `ApiExportedMixin` mixin.\n *\n * @remarks\n *\n * The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of\n * the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however\n * the TypeScript type system cannot invoke a runtime test.)\n */\n export function isBaseClassOf(apiItem: ApiItem): apiItem is ApiExportedMixin {\n return apiItem.hasOwnProperty(_isExported);\n }\n}\n"]}
1
+ {"version":3,"file":"ApiExportedMixin.js","sourceRoot":"","sources":["../../src/mixins/ApiExportedMixin.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAgF3D,4CA4CC;AA1HD,oDAAoD;AAEpD,kGAA2G;AAiB3G,MAAM,WAAW,GAAkB,MAAM,CAAC,8BAA8B,CAAC,CAAC;AAmD1E;;;;;;;GAOG;AACH,SAAgB,gBAAgB,CAC9B,SAAqB;AACrB,8DAA8D;;IAE9D,MAAM,UAAW,SAAQ,SAAS;QAGhC,8DAA8D;QAC9D,YAAmB,GAAG,IAAW;YAC/B,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;YAEf,MAAM,OAAO,GAA6B,IAAI,CAAC,CAAC,CAAC,CAAC;YAClD,IAAI,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;QACzC,CAAC;QAED,gBAAgB;QACT,MAAM,CAAC,iBAAiB,CAC7B,OAA0C,EAC1C,OAA4B,EAC5B,UAAiC;YAEjC,SAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;YAE1D,MAAM,oBAAoB,GAAyB,2CAAoB,CAAC,KAAK,CAC3E,UAAU,CAAC,kBAAkB,CAC9B,CAAC;YACF,OAAO,CAAC,UAAU,GAAG,oBAAoB,CAAC,UAAU,KAAK,iCAAU,CAAC,OAAO,CAAC;QAC9E,CAAC;QAED,IAAW,UAAU;YACnB,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC;QAC3B,CAAC;QAED;;;;WAIG;QACI,aAAa,CAAC,UAA0C;YAC7D,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAClC,CAAC;KACF;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;GAGG;AACH,WAAiB,gBAAgB;IAC/B;;;;;;;;OAQG;IACH,SAAgB,aAAa,CAAC,OAAgB;QAC5C,OAAO,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC7C,CAAC;IAFe,8BAAa,gBAE5B,CAAA;AACH,CAAC,EAbgB,gBAAgB,gCAAhB,gBAAgB,QAahC","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 @typescript-eslint/no-redeclare */\n\nimport { DeclarationReference, Navigation } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\n\nimport type { ApiItem, IApiItemJson, IApiItemConstructor, IApiItemOptions } from '../items/ApiItem';\nimport type { DeserializerContext } from '../model/DeserializerContext';\n\n/**\n * Constructor options for {@link (IApiExportedMixinOptions:interface)}.\n * @public\n */\nexport interface IApiExportedMixinOptions extends IApiItemOptions {\n isExported: boolean;\n}\n\nexport interface IApiExportedMixinJson extends IApiItemJson {\n isExported: boolean;\n}\n\nconst _isExported: unique symbol = Symbol('ApiExportedMixin._isExported');\n\n/**\n * The mixin base class for API items that can be exported.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations. The non-abstract classes (e.g. `ApiClass`, `ApiEnum`, `ApiInterface`, etc.) use\n * TypeScript \"mixin\" functions (e.g. `ApiDeclaredItem`, `ApiItemContainerMixin`, etc.) to add various\n * features that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class\n * to extend more than one base class). The \"mixin\" is a TypeScript merged declaration with three components:\n * the function that generates a subclass, an interface that describes the members of the subclass, and\n * a namespace containing static members of the class.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ApiExportedMixin extends ApiItem {\n /**\n * Whether the declaration is exported from its parent item container (i.e. either an `ApiEntryPoint` or an\n * `ApiNamespace`).\n *\n * @remarks\n * Suppose `index.ts` is your entry point:\n *\n * ```ts\n * // index.ts\n *\n * export class A {}\n * class B {}\n *\n * namespace n {\n * export class C {}\n * class D {}\n * }\n *\n * // file.ts\n * export class E {}\n * ```\n *\n * Classes `A` and `C` are both exported, while classes `B`, `D`, and `E` are not. `E` is exported from its\n * local file, but not from its parent item container (i.e. the entry point).\n *\n */\n readonly isExported: boolean;\n\n /** @override */\n serializeInto(jsonObject: Partial<IApiItemJson>): void;\n}\n\n/**\n * Mixin function for {@link (ApiExportedMixin:interface)}.\n *\n * @param baseClass - The base class to be extended\n * @returns A child class that extends baseClass, adding the {@link (ApiExportedMixin:interface)} functionality.\n *\n * @public\n */\nexport function ApiExportedMixin<TBaseClass extends IApiItemConstructor>(\n baseClass: TBaseClass\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): TBaseClass & (new (...args: any[]) => ApiExportedMixin) {\n class MixedClass extends baseClass implements ApiExportedMixin {\n public [_isExported]: boolean;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(...args: any[]) {\n super(...args);\n\n const options: IApiExportedMixinOptions = args[0];\n this[_isExported] = options.isExported;\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiExportedMixinOptions>,\n context: DeserializerContext,\n jsonObject: IApiExportedMixinJson\n ): void {\n baseClass.onDeserializeInto(options, context, jsonObject);\n\n const declarationReference: DeclarationReference = DeclarationReference.parse(\n jsonObject.canonicalReference\n );\n options.isExported = declarationReference.navigation === Navigation.Exports;\n }\n\n public get isExported(): boolean {\n return this[_isExported];\n }\n\n /**\n * The `isExported` property is intentionally not serialized because the information is already present\n * in the item's `canonicalReference`.\n * @override\n */\n public serializeInto(jsonObject: Partial<IApiExportedMixinJson>): void {\n super.serializeInto(jsonObject);\n }\n }\n\n return MixedClass;\n}\n\n/**\n * Static members for {@link (ApiExportedMixin:interface)}.\n * @public\n */\nexport namespace ApiExportedMixin {\n /**\n * A type guard that tests whether the specified `ApiItem` subclass extends the `ApiExportedMixin` mixin.\n *\n * @remarks\n *\n * The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of\n * the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however\n * the TypeScript type system cannot invoke a runtime test.)\n */\n export function isBaseClassOf(apiItem: ApiItem): apiItem is ApiExportedMixin {\n return apiItem.hasOwnProperty(_isExported);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiInitializerMixin.d.ts","sourceRoot":"","sources":["../../src/mixins/ApiInitializerMixin.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpG,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAK7D;;;GAGG;AACH,MAAM,WAAW,2BAA4B,SAAQ,eAAe;IAClE,qBAAqB,CAAC,EAAE,kBAAkB,CAAC;CAC5C;AAED,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,qBAAqB,CAAC,EAAE,kBAAkB,CAAC;CAC5C;AAID;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,mBAAoB,SAAQ,OAAO;IAClD;;OAEG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAEtC,gBAAgB;IAChB,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC;CACpE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,SAAS,mBAAmB,EACxE,SAAS,EAAE,UAAU,GAEpB,UAAU,GAAG,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,mBAAmB,CAAC,CAgD5D;AAED;;;GAGG;AACH,yBAAiB,mBAAmB,CAAC;IACnC;;;;;;;;OAQG;IACH,SAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAE9E;CACF"}
1
+ {"version":3,"file":"ApiInitializerMixin.d.ts","sourceRoot":"","sources":["../../src/mixins/ApiInitializerMixin.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpG,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAI7D;;;GAGG;AACH,MAAM,WAAW,2BAA4B,SAAQ,eAAe;IAClE,qBAAqB,CAAC,EAAE,kBAAkB,CAAC;CAC5C;AAED,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,qBAAqB,CAAC,EAAE,kBAAkB,CAAC;CAC5C;AAID;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,mBAAoB,SAAQ,OAAO;IAClD;;OAEG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAEtC,gBAAgB;IAChB,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC;CACpE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,SAAS,mBAAmB,EACxE,SAAS,EAAE,UAAU,GAEpB,UAAU,GAAG,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,mBAAmB,CAAC,CAgD5D;AAED;;;GAGG;AACH,yBAAiB,mBAAmB,CAAC;IACnC;;;;;;;;OAQG;IACH,SAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAE9E;CACF"}
@@ -3,8 +3,9 @@
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.ApiInitializerMixin = ApiInitializerMixin;
6
- const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
6
+ /* eslint-disable @typescript-eslint/no-redeclare */
7
7
  const node_core_library_1 = require("@rushstack/node-core-library");
8
+ const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
8
9
  const _initializerExcerpt = Symbol('ApiInitializerMixin._initializerExcerpt');
9
10
  /**
10
11
  * Mixin function for {@link (ApiInitializerMixin:interface)}.
@@ -1 +1 @@
1
- {"version":3,"file":"ApiInitializerMixin.js","sourceRoot":"","sources":["../../src/mixins/ApiInitializerMixin.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AA0D3D,kDAmDC;AAvGD,8DAA2D;AAC3D,oEAA6D;AAe7D,MAAM,mBAAmB,GAAkB,MAAM,CAAC,yCAAyC,CAAC,CAAC;AA4B7F;;;;;;;GAOG;AACH,SAAgB,mBAAmB,CACjC,SAAqB;AACrB,8DAA8D;;IAE9D,MAAM,UAAW,SAAQ,SAAS;QAGhC,8DAA8D;QAC9D,YAAmB,GAAG,IAAW;YAC/B,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;YAEf,MAAM,OAAO,GAAgC,IAAI,CAAC,CAAC,CAAC,CAAC;YAErD,IAAI,IAAI,YAAY,iCAAe,EAAE,CAAC;gBACpC,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;oBAClC,IAAI,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;gBAC/E,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,iCAAa,CACrB,6EAA6E,CAC9E,CAAC;YACJ,CAAC;QACH,CAAC;QAED,gBAAgB;QACT,MAAM,CAAC,iBAAiB,CAC7B,OAA6C,EAC7C,OAA4B,EAC5B,UAAoC;YAEpC,SAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;YAE1D,OAAO,CAAC,qBAAqB,GAAG,UAAU,CAAC,qBAAqB,CAAC;QACnE,CAAC;QAED,IAAW,kBAAkB;YAC3B,OAAO,IAAI,CAAC,mBAAmB,CAAC,CAAC;QACnC,CAAC;QAED,gBAAgB;QACT,aAAa,CAAC,UAA6C;YAChE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAEhC,iHAAiH;YACjH,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBAC5B,UAAU,CAAC,qBAAqB,GAAG,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC;YACxE,CAAC;QACH,CAAC;KACF;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;GAGG;AACH,WAAiB,mBAAmB;IAClC;;;;;;;;OAQG;IACH,SAAgB,aAAa,CAAC,OAAgB;QAC5C,OAAO,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;IACrD,CAAC;IAFe,iCAAa,gBAE5B,CAAA;AACH,CAAC,EAbgB,mBAAmB,mCAAnB,mBAAmB,QAanC","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 @typescript-eslint/no-redeclare */\n\nimport type { ApiItem, IApiItemJson, IApiItemConstructor, IApiItemOptions } from '../items/ApiItem';\nimport type { IExcerptTokenRange, Excerpt } from './Excerpt';\nimport { ApiDeclaredItem } from '../items/ApiDeclaredItem';\nimport { InternalError } from '@rushstack/node-core-library';\nimport type { DeserializerContext } from '../model/DeserializerContext';\n\n/**\n * Constructor options for {@link (IApiInitializerMixinOptions:interface)}.\n * @public\n */\nexport interface IApiInitializerMixinOptions extends IApiItemOptions {\n initializerTokenRange?: IExcerptTokenRange;\n}\n\nexport interface IApiInitializerMixinJson extends IApiItemJson {\n initializerTokenRange?: IExcerptTokenRange;\n}\n\nconst _initializerExcerpt: unique symbol = Symbol('ApiInitializerMixin._initializerExcerpt');\n\n/**\n * The mixin base class for API items that can have an initializer.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations. The non-abstract classes (e.g. `ApiClass`, `ApiEnum`, `ApiInterface`, etc.) use\n * TypeScript \"mixin\" functions (e.g. `ApiDeclaredItem`, `ApiItemContainerMixin`, etc.) to add various\n * features that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class\n * to extend more than one base class). The \"mixin\" is a TypeScript merged declaration with three components:\n * the function that generates a subclass, an interface that describes the members of the subclass, and\n * a namespace containing static members of the class.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ApiInitializerMixin extends ApiItem {\n /**\n * An {@link Excerpt} that describes the item's initializer.\n */\n readonly initializerExcerpt?: Excerpt;\n\n /** @override */\n serializeInto(jsonObject: Partial<IApiInitializerMixinJson>): void;\n}\n\n/**\n * Mixin function for {@link (ApiInitializerMixin:interface)}.\n *\n * @param baseClass - The base class to be extended\n * @returns A child class that extends baseClass, adding the {@link (ApiInitializerMixin:interface)} functionality.\n *\n * @public\n */\nexport function ApiInitializerMixin<TBaseClass extends IApiItemConstructor>(\n baseClass: TBaseClass\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): TBaseClass & (new (...args: any[]) => ApiInitializerMixin) {\n class MixedClass extends baseClass implements ApiInitializerMixin {\n public [_initializerExcerpt]?: Excerpt;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(...args: any[]) {\n super(...args);\n\n const options: IApiInitializerMixinOptions = args[0];\n\n if (this instanceof ApiDeclaredItem) {\n if (options.initializerTokenRange) {\n this[_initializerExcerpt] = this.buildExcerpt(options.initializerTokenRange);\n }\n } else {\n throw new InternalError(\n 'ApiInitializerMixin expects a base class that inherits from ApiDeclaredItem'\n );\n }\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiInitializerMixinOptions>,\n context: DeserializerContext,\n jsonObject: IApiInitializerMixinJson\n ): void {\n baseClass.onDeserializeInto(options, context, jsonObject);\n\n options.initializerTokenRange = jsonObject.initializerTokenRange;\n }\n\n public get initializerExcerpt(): Excerpt | undefined {\n return this[_initializerExcerpt];\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiInitializerMixinJson>): void {\n super.serializeInto(jsonObject);\n\n // Note that JSON does not support the \"undefined\" value, so we simply omit the field entirely if it is undefined\n if (this.initializerExcerpt) {\n jsonObject.initializerTokenRange = this.initializerExcerpt.tokenRange;\n }\n }\n }\n\n return MixedClass;\n}\n\n/**\n * Static members for {@link (ApiInitializerMixin:interface)}.\n * @public\n */\nexport namespace ApiInitializerMixin {\n /**\n * A type guard that tests whether the specified `ApiItem` subclass extends the `ApiInitializerMixin` mixin.\n *\n * @remarks\n *\n * The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of\n * the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however\n * the TypeScript type system cannot invoke a runtime test.)\n */\n export function isBaseClassOf(apiItem: ApiItem): apiItem is ApiInitializerMixin {\n return apiItem.hasOwnProperty(_initializerExcerpt);\n }\n}\n"]}
1
+ {"version":3,"file":"ApiInitializerMixin.js","sourceRoot":"","sources":["../../src/mixins/ApiInitializerMixin.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AA2D3D,kDAmDC;AA5GD,oDAAoD;AAEpD,oEAA6D;AAI7D,8DAA2D;AAe3D,MAAM,mBAAmB,GAAkB,MAAM,CAAC,yCAAyC,CAAC,CAAC;AA4B7F;;;;;;;GAOG;AACH,SAAgB,mBAAmB,CACjC,SAAqB;AACrB,8DAA8D;;IAE9D,MAAM,UAAW,SAAQ,SAAS;QAGhC,8DAA8D;QAC9D,YAAmB,GAAG,IAAW;YAC/B,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;YAEf,MAAM,OAAO,GAAgC,IAAI,CAAC,CAAC,CAAC,CAAC;YAErD,IAAI,IAAI,YAAY,iCAAe,EAAE,CAAC;gBACpC,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;oBAClC,IAAI,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;gBAC/E,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,iCAAa,CACrB,6EAA6E,CAC9E,CAAC;YACJ,CAAC;QACH,CAAC;QAED,gBAAgB;QACT,MAAM,CAAC,iBAAiB,CAC7B,OAA6C,EAC7C,OAA4B,EAC5B,UAAoC;YAEpC,SAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;YAE1D,OAAO,CAAC,qBAAqB,GAAG,UAAU,CAAC,qBAAqB,CAAC;QACnE,CAAC;QAED,IAAW,kBAAkB;YAC3B,OAAO,IAAI,CAAC,mBAAmB,CAAC,CAAC;QACnC,CAAC;QAED,gBAAgB;QACT,aAAa,CAAC,UAA6C;YAChE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAEhC,iHAAiH;YACjH,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBAC5B,UAAU,CAAC,qBAAqB,GAAG,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC;YACxE,CAAC;QACH,CAAC;KACF;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;GAGG;AACH,WAAiB,mBAAmB;IAClC;;;;;;;;OAQG;IACH,SAAgB,aAAa,CAAC,OAAgB;QAC5C,OAAO,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;IACrD,CAAC;IAFe,iCAAa,gBAE5B,CAAA;AACH,CAAC,EAbgB,mBAAmB,mCAAnB,mBAAmB,QAanC","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 @typescript-eslint/no-redeclare */\n\nimport { InternalError } from '@rushstack/node-core-library';\n\nimport type { ApiItem, IApiItemJson, IApiItemConstructor, IApiItemOptions } from '../items/ApiItem';\nimport type { IExcerptTokenRange, Excerpt } from './Excerpt';\nimport { ApiDeclaredItem } from '../items/ApiDeclaredItem';\nimport type { DeserializerContext } from '../model/DeserializerContext';\n\n/**\n * Constructor options for {@link (IApiInitializerMixinOptions:interface)}.\n * @public\n */\nexport interface IApiInitializerMixinOptions extends IApiItemOptions {\n initializerTokenRange?: IExcerptTokenRange;\n}\n\nexport interface IApiInitializerMixinJson extends IApiItemJson {\n initializerTokenRange?: IExcerptTokenRange;\n}\n\nconst _initializerExcerpt: unique symbol = Symbol('ApiInitializerMixin._initializerExcerpt');\n\n/**\n * The mixin base class for API items that can have an initializer.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations. The non-abstract classes (e.g. `ApiClass`, `ApiEnum`, `ApiInterface`, etc.) use\n * TypeScript \"mixin\" functions (e.g. `ApiDeclaredItem`, `ApiItemContainerMixin`, etc.) to add various\n * features that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class\n * to extend more than one base class). The \"mixin\" is a TypeScript merged declaration with three components:\n * the function that generates a subclass, an interface that describes the members of the subclass, and\n * a namespace containing static members of the class.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ApiInitializerMixin extends ApiItem {\n /**\n * An {@link Excerpt} that describes the item's initializer.\n */\n readonly initializerExcerpt?: Excerpt;\n\n /** @override */\n serializeInto(jsonObject: Partial<IApiInitializerMixinJson>): void;\n}\n\n/**\n * Mixin function for {@link (ApiInitializerMixin:interface)}.\n *\n * @param baseClass - The base class to be extended\n * @returns A child class that extends baseClass, adding the {@link (ApiInitializerMixin:interface)} functionality.\n *\n * @public\n */\nexport function ApiInitializerMixin<TBaseClass extends IApiItemConstructor>(\n baseClass: TBaseClass\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): TBaseClass & (new (...args: any[]) => ApiInitializerMixin) {\n class MixedClass extends baseClass implements ApiInitializerMixin {\n public [_initializerExcerpt]?: Excerpt;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(...args: any[]) {\n super(...args);\n\n const options: IApiInitializerMixinOptions = args[0];\n\n if (this instanceof ApiDeclaredItem) {\n if (options.initializerTokenRange) {\n this[_initializerExcerpt] = this.buildExcerpt(options.initializerTokenRange);\n }\n } else {\n throw new InternalError(\n 'ApiInitializerMixin expects a base class that inherits from ApiDeclaredItem'\n );\n }\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiInitializerMixinOptions>,\n context: DeserializerContext,\n jsonObject: IApiInitializerMixinJson\n ): void {\n baseClass.onDeserializeInto(options, context, jsonObject);\n\n options.initializerTokenRange = jsonObject.initializerTokenRange;\n }\n\n public get initializerExcerpt(): Excerpt | undefined {\n return this[_initializerExcerpt];\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiInitializerMixinJson>): void {\n super.serializeInto(jsonObject);\n\n // Note that JSON does not support the \"undefined\" value, so we simply omit the field entirely if it is undefined\n if (this.initializerExcerpt) {\n jsonObject.initializerTokenRange = this.initializerExcerpt.tokenRange;\n }\n }\n }\n\n return MixedClass;\n}\n\n/**\n * Static members for {@link (ApiInitializerMixin:interface)}.\n * @public\n */\nexport namespace ApiInitializerMixin {\n /**\n * A type guard that tests whether the specified `ApiItem` subclass extends the `ApiInitializerMixin` mixin.\n *\n * @remarks\n *\n * The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of\n * the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however\n * the TypeScript type system cannot invoke a runtime test.)\n */\n export function isBaseClassOf(apiItem: ApiItem): apiItem is ApiInitializerMixin {\n return apiItem.hasOwnProperty(_initializerExcerpt);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiItemContainerMixin.d.ts","sourceRoot":"","sources":["../../src/mixins/ApiItemContainerMixin.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,OAAO,EAEP,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EAEzB,MAAM,kBAAkB,CAAC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;IAChB,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;CACxD;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,SAAS,mBAAmB,EAC1E,SAAS,EAAE,UAAU,GAEpB,UAAU,GAAG,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,qBAAqB,CAAC,CAkV9D;AAED;;;GAGG;AACH,yBAAiB,qBAAqB,CAAC;IACrC;;;;;;;;OAQG;IACH,SAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,qBAAqB,CAEhF;CACF"}
@@ -4,11 +4,11 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.ApiItemContainerMixin = ApiItemContainerMixin;
6
6
  /* eslint-disable @typescript-eslint/no-redeclare */
7
+ const node_core_library_1 = require("@rushstack/node-core-library");
7
8
  const ApiItem_1 = require("../items/ApiItem");
8
9
  const ApiNameMixin_1 = require("./ApiNameMixin");
9
10
  const Excerpt_1 = require("./Excerpt");
10
11
  const IFindApiItemsResult_1 = require("./IFindApiItemsResult");
11
- const node_core_library_1 = require("@rushstack/node-core-library");
12
12
  const _members = Symbol('ApiItemContainerMixin._members');
13
13
  const _membersSorted = Symbol('ApiItemContainerMixin._membersSorted');
14
14
  const _membersByContainerKey = Symbol('ApiItemContainerMixin._membersByContainerKey');
@@ -1 +1 @@
1
- {"version":3,"file":"ApiItemContainerMixin.js","sourceRoot":"","sources":["../../src/mixins/ApiItemContainerMixin.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AA0L3D,sDAqVC;AA7gBD,oDAAoD;AAEpD,8CAO0B;AAC1B,iDAA8C;AAK9C,uCAAgE;AAChE,+DAI+B;AAC/B,oEAA6D;AAmB7D,MAAM,QAAQ,GAAkB,MAAM,CAAC,gCAAgC,CAAC,CAAC;AACzE,MAAM,cAAc,GAAkB,MAAM,CAAC,sCAAsC,C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AAC;YAEzC,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBAClC,MAAM,gBAAgB,GAA0B,EAAE,CAAC;gBACnD,MAAM,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;gBACvC,aAAa,CAAC,IAAI,CAAC,gBAAgC,CAAC,CAAC;YACvD,CAAC;YAED,UAAU,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC;YAC1D,UAAU,CAAC,OAAO,GAAG,aAAa,CAAC;QACrC,CAAC;KACF;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;GAGG;AACH,WAAiB,qBAAqB;IACpC;;;;;;;;OAQG;IACH,SAAgB,aAAa,CAAC,OAAgB;QAC5C,OAAO,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAFe,mCAAa,gBAE5B,CAAA;AACH,CAAC,EAbgB,qBAAqB,qCAArB,qBAAqB,QAarC","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 @typescript-eslint/no-redeclare */\n\nimport {\n ApiItem,\n apiItem_onParentChanged,\n type IApiItemJson,\n type IApiItemOptions,\n type IApiItemConstructor,\n ApiItemKind\n} from '../items/ApiItem';\nimport { ApiNameMixin } from './ApiNameMixin';\nimport type { DeserializerContext } from '../model/DeserializerContext';\nimport type { ApiModel } from '../model/ApiModel';\nimport type { ApiClass } from '../model/ApiClass';\nimport type { ApiInterface } from '../model/ApiInterface';\nimport { type ExcerptToken, ExcerptTokenKind } from './Excerpt';\nimport {\n type IFindApiItemsResult,\n type IFindApiItemsMessage,\n FindApiItemsMessageId\n} from './IFindApiItemsResult';\nimport { InternalError } from '@rushstack/node-core-library';\nimport type { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport type { HeritageType } from '../model/HeritageType';\nimport type { IResolveDeclarationReferenceResult } from '../model/ModelReferenceResolver';\n\n/**\n * Constructor options for {@link (ApiItemContainerMixin:interface)}.\n * @public\n */\nexport interface IApiItemContainerMixinOptions extends IApiItemOptions {\n preserveMemberOrder?: boolean;\n members?: ApiItem[];\n}\n\nexport interface IApiItemContainerJson extends IApiItemJson {\n preserveMemberOrder?: boolean;\n members: IApiItemJson[];\n}\n\nconst _members: unique symbol = Symbol('ApiItemContainerMixin._members');\nconst _membersSorted: unique symbol = Symbol('ApiItemContainerMixin._membersSorted');\nconst _membersByContainerKey: unique symbol = Symbol('ApiItemContainerMixin._membersByContainerKey');\nconst _membersByName: unique symbol = Symbol('ApiItemContainerMixin._membersByName');\nconst _membersByKind: unique symbol = Symbol('ApiItemContainerMixin._membersByKind');\nconst _preserveMemberOrder: unique symbol = Symbol('ApiItemContainerMixin._preserveMemberOrder');\n\n/**\n * The mixin base class for API items that act as containers for other child items.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations. The non-abstract classes (e.g. `ApiClass`, `ApiEnum`, `ApiInterface`, etc.) use\n * TypeScript \"mixin\" functions (e.g. `ApiDeclaredItem`, `ApiItemContainerMixin`, etc.) to add various\n * features that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class\n * to extend more than one base class). The \"mixin\" is a TypeScript merged declaration with three components:\n * the function that generates a subclass, an interface that describes the members of the subclass, and\n * a namespace containing static members of the class.\n *\n * Examples of `ApiItemContainerMixin` child classes include `ApiModel`, `ApiPackage`, `ApiEntryPoint`,\n * and `ApiEnum`. But note that `Parameter` is not considered a \"member\" of an `ApiMethod`; this relationship\n * is modeled using {@link (ApiParameterListMixin:interface).parameters} instead\n * of {@link ApiItem.members}.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ApiItemContainerMixin extends ApiItem {\n /**\n * Disables automatic sorting of {@link ApiItem.members}.\n *\n * @remarks\n * By default `ApiItemContainerMixin` will automatically sort its members according to their\n * {@link ApiItem.getSortKey} string, which provides a standardized mostly alphabetical ordering\n * that is appropriate for most API items. When loading older .api.json files the automatic sorting\n * is reapplied and may update the ordering.\n *\n * Set `preserveMemberOrder` to true to disable automatic sorting for this container; instead, the\n * members will retain whatever ordering appeared in the {@link IApiItemContainerMixinOptions.members} array.\n * The `preserveMemberOrder` option is saved in the .api.json file.\n */\n readonly preserveMemberOrder: boolean;\n\n /**\n * Adds a new member to the container.\n *\n * @remarks\n * An ApiItem cannot be added to more than one container.\n */\n addMember(member: ApiItem): void;\n\n /**\n * Attempts to retrieve a member using its containerKey, or returns `undefined` if no matching member was found.\n *\n * @remarks\n * Use the `getContainerKey()` static member to construct the key. Each subclass has a different implementation\n * of this function, according to the aspects that are important for identifying it.\n *\n * See {@link ApiItem.containerKey} for more information.\n */\n tryGetMemberByKey(containerKey: string): ApiItem | undefined;\n\n /**\n * Returns a list of members with the specified name.\n */\n findMembersByName(name: string): ReadonlyArray<ApiItem>;\n\n /**\n * Finds all of the ApiItem's immediate and inherited members by walking up the inheritance tree.\n *\n * @remarks\n *\n * Given the following class heritage:\n *\n * ```\n * export class A {\n * public a: number|boolean;\n * }\n *\n * export class B extends A {\n * public a: number;\n * public b: string;\n * }\n *\n * export class C extends B {\n * public c: boolean;\n * }\n * ```\n *\n * Calling `findMembersWithInheritance` on `C` will return `B.a`, `B.b`, and `C.c`. Calling the\n * method on `B` will return `B.a` and `B.b`. And calling the method on `A` will return just\n * `A.a`.\n *\n * The inherited members returned by this method may be incomplete. If so, there will be a flag\n * on the result object indicating this as well as messages explaining the errors in more detail.\n * Some scenarios include:\n *\n * - Interface extending from a type alias.\n *\n * - Class extending from a variable.\n *\n * - Extending from a declaration not present in the model (e.g. external package).\n *\n * - Extending from an unexported declaration (e.g. ae-forgotten-export). Common in mixin\n * patterns.\n *\n * - Unexpected runtime errors...\n *\n * Lastly, be aware that the types of inherited members are returned with respect to their\n * defining class as opposed to with respect to the inheriting class. For example, consider\n * the following:\n *\n * ```\n * export class A<T> {\n * public a: T;\n * }\n *\n * export class B extends A<number> {}\n * ```\n *\n * When called on `B`, this method will return `B.a` with type `T` as opposed to type\n * `number`, although the latter is more accurate.\n */\n findMembersWithInheritance(): IFindApiItemsResult;\n\n /**\n * For a given member of this container, return its `ApiItem.getMergedSiblings()` list.\n * @internal\n */\n _getMergedSiblingsForMember(memberApiItem: ApiItem): ReadonlyArray<ApiItem>;\n\n /** @override */\n serializeInto(jsonObject: Partial<IApiItemJson>): void;\n}\n\n/**\n * Mixin function for {@link ApiDeclaredItem}.\n *\n * @param baseClass - The base class to be extended\n * @returns A child class that extends baseClass, adding the {@link (ApiItemContainerMixin:interface)} functionality.\n *\n * @public\n */\nexport function ApiItemContainerMixin<TBaseClass extends IApiItemConstructor>(\n baseClass: TBaseClass\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): TBaseClass & (new (...args: any[]) => ApiItemContainerMixin) {\n class MixedClass extends baseClass implements ApiItemContainerMixin {\n public readonly [_members]: ApiItem[];\n public [_membersSorted]: boolean;\n public [_membersByContainerKey]: Map<string, ApiItem>;\n public [_preserveMemberOrder]: boolean;\n\n // For members of this container that extend ApiNameMixin, this stores the list of members with a given name.\n // Examples include merged declarations, overloaded functions, etc.\n public [_membersByName]: Map<string, ApiItem[]> | undefined;\n\n // For members of this container that do NOT extend ApiNameMixin, this stores the list of members\n // that share a common ApiItemKind. Examples include overloaded constructors or index signatures.\n public [_membersByKind]: Map<string, ApiItem[]> | undefined; // key is ApiItemKind\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(...args: any[]) {\n super(...args);\n const options: IApiItemContainerMixinOptions = args[0] as IApiItemContainerMixinOptions;\n\n this[_members] = [];\n this[_membersSorted] = false;\n this[_membersByContainerKey] = new Map<string, ApiItem>();\n this[_preserveMemberOrder] = options.preserveMemberOrder ?? false;\n\n if (options.members) {\n for (const member of options.members) {\n this.addMember(member);\n }\n }\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiItemContainerMixinOptions>,\n context: DeserializerContext,\n jsonObject: IApiItemContainerJson\n ): void {\n baseClass.onDeserializeInto(options, context, jsonObject);\n options.preserveMemberOrder = jsonObject.preserveMemberOrder;\n options.members = [];\n for (const memberObject of jsonObject.members) {\n options.members.push(ApiItem.deserialize(memberObject, context));\n }\n }\n\n /** @override */\n public get members(): ReadonlyArray<ApiItem> {\n if (!this[_membersSorted] && !this[_preserveMemberOrder]) {\n this[_members].sort((x, y) => x.getSortKey().localeCompare(y.getSortKey()));\n this[_membersSorted] = true;\n }\n\n return this[_members];\n }\n\n public get preserveMemberOrder(): boolean {\n return this[_preserveMemberOrder];\n }\n\n public addMember(member: ApiItem): void {\n if (this[_membersByContainerKey].has(member.containerKey)) {\n throw new Error(\n `Another member has already been added with the same name (${member.displayName})` +\n ` and containerKey (${member.containerKey})`\n );\n }\n\n const existingParent: ApiItem | undefined = member.parent;\n if (existingParent !== undefined) {\n throw new Error(\n `This item has already been added to another container: \"${existingParent.displayName}\"`\n );\n }\n\n this[_members].push(member);\n this[_membersByName] = undefined; // invalidate the lookup\n this[_membersByKind] = undefined; // invalidate the lookup\n this[_membersSorted] = false;\n this[_membersByContainerKey].set(member.containerKey, member);\n\n member[apiItem_onParentChanged](this);\n }\n\n public tryGetMemberByKey(containerKey: string): ApiItem | undefined {\n return this[_membersByContainerKey].get(containerKey);\n }\n\n public findMembersByName(name: string): ReadonlyArray<ApiItem> {\n this._ensureMemberMaps();\n return this[_membersByName]!.get(name) || [];\n }\n\n public findMembersWithInheritance(): IFindApiItemsResult {\n const messages: IFindApiItemsMessage[] = [];\n let maybeIncompleteResult: boolean = false;\n\n // For API items that don't support inheritance, this method just returns the item's\n // immediate members.\n switch (this.kind) {\n case ApiItemKind.Class:\n case ApiItemKind.Interface:\n break;\n default: {\n return {\n items: this.members.concat(),\n messages,\n maybeIncompleteResult\n };\n }\n }\n\n const membersByName: Map<string, ApiItem[]> = new Map();\n const membersByKind: Map<ApiItemKind, ApiItem[]> = new Map();\n\n const toVisit: ApiItem[] = [];\n let next: ApiItem | undefined = this;\n\n while (next) {\n const membersToAdd: ApiItem[] = [];\n\n // For each member, check to see if we've already seen a member with the same name\n // previously in the inheritance tree. If so, we know we won't inherit it, and thus\n // do not add it to our `membersToAdd` array.\n for (const member of next.members) {\n // We add the to-be-added members to an intermediate array instead of immediately\n // to the maps themselves to support method overloads with the same name.\n if (ApiNameMixin.isBaseClassOf(member)) {\n if (!membersByName.has(member.name)) {\n membersToAdd.push(member);\n }\n } else {\n if (!membersByKind.has(member.kind)) {\n membersToAdd.push(member);\n }\n }\n }\n\n for (const member of membersToAdd) {\n if (ApiNameMixin.isBaseClassOf(member)) {\n const members: ApiItem[] = membersByName.get(member.name) || [];\n members.push(member);\n membersByName.set(member.name, members);\n } else {\n const members: ApiItem[] = membersByKind.get(member.kind) || [];\n members.push(member);\n membersByKind.set(member.kind, members);\n }\n }\n\n // Interfaces can extend multiple interfaces, so iterate through all of them.\n const extendedItems: ApiItem[] = [];\n let extendsTypes: readonly HeritageType[] | undefined;\n\n switch (next.kind) {\n case ApiItemKind.Class: {\n const apiClass: ApiClass = next as ApiClass;\n extendsTypes = apiClass.extendsType ? [apiClass.extendsType] : [];\n break;\n }\n case ApiItemKind.Interface: {\n const apiInterface: ApiInterface = next as ApiInterface;\n extendsTypes = apiInterface.extendsTypes;\n break;\n }\n }\n\n if (extendsTypes === undefined) {\n messages.push({\n messageId: FindApiItemsMessageId.UnsupportedKind,\n text: `Unable to analyze references of API item ${next.displayName} because it is of unsupported kind ${next.kind}`\n });\n maybeIncompleteResult = true;\n next = toVisit.shift();\n continue;\n }\n\n for (const extendsType of extendsTypes) {\n // We want to find the reference token associated with the actual inherited declaration.\n // In every case we support, this is the first reference token. For example:\n //\n // ```\n // export class A extends B {}\n // ^\n // export class A extends B<C> {}\n // ^\n // export class A extends B.C {}\n // ^^^\n // ```\n const firstReferenceToken: ExcerptToken | undefined = extendsType.excerpt.spannedTokens.find(\n (token: ExcerptToken) => {\n return token.kind === ExcerptTokenKind.Reference && token.canonicalReference;\n }\n );\n\n if (!firstReferenceToken) {\n messages.push({\n messageId: FindApiItemsMessageId.ExtendsClauseMissingReference,\n text: `Unable to analyze extends clause ${extendsType.excerpt.text} of API item ${next.displayName} because no canonical reference was found`\n });\n maybeIncompleteResult = true;\n continue;\n }\n\n const apiModel: ApiModel | undefined = this.getAssociatedModel();\n if (!apiModel) {\n messages.push({\n messageId: FindApiItemsMessageId.NoAssociatedApiModel,\n text: `Unable to analyze references of API item ${next.displayName} because it is not associated with an ApiModel`\n });\n maybeIncompleteResult = true;\n continue;\n }\n\n const canonicalReference: DeclarationReference = firstReferenceToken.canonicalReference!;\n const apiItemResult: IResolveDeclarationReferenceResult = apiModel.resolveDeclarationReference(\n canonicalReference,\n undefined\n );\n\n const apiItem: ApiItem | undefined = apiItemResult.resolvedApiItem;\n if (!apiItem) {\n messages.push({\n messageId: FindApiItemsMessageId.DeclarationResolutionFailed,\n text: `Unable to resolve declaration reference within API item ${next.displayName}: ${apiItemResult.errorMessage}`\n });\n maybeIncompleteResult = true;\n continue;\n }\n\n extendedItems.push(apiItem);\n }\n\n // For classes, this array will only have one item. For interfaces, there may be multiple items. Sort the array\n // into alphabetical order before adding to our list of API items to visit. This ensures that in the case\n // of multiple interface inheritance, a member inherited from multiple interfaces is attributed to the interface\n // earlier in alphabetical order (as opposed to source order).\n //\n // For example, in the code block below, `Bar.x` is reported as the inherited item, not `Foo.x`.\n //\n // ```\n // interface Foo {\n // public x: string;\n // }\n //\n // interface Bar {\n // public x: string;\n // }\n //\n // interface FooBar extends Foo, Bar {}\n // ```\n extendedItems.sort((x: ApiItem, y: ApiItem) => x.getSortKey().localeCompare(y.getSortKey()));\n\n toVisit.push(...extendedItems);\n next = toVisit.shift();\n }\n\n const items: ApiItem[] = [];\n for (const members of membersByName.values()) {\n items.push(...members);\n }\n for (const members of membersByKind.values()) {\n items.push(...members);\n }\n items.sort((x: ApiItem, y: ApiItem) => x.getSortKey().localeCompare(y.getSortKey()));\n\n return {\n items,\n messages,\n maybeIncompleteResult\n };\n }\n\n /** @internal */\n public _getMergedSiblingsForMember(memberApiItem: ApiItem): ReadonlyArray<ApiItem> {\n this._ensureMemberMaps();\n let result: ApiItem[] | undefined;\n if (ApiNameMixin.isBaseClassOf(memberApiItem)) {\n result = this[_membersByName]!.get(memberApiItem.name);\n } else {\n result = this[_membersByKind]!.get(memberApiItem.kind);\n }\n if (!result) {\n throw new InternalError('Item was not found in the _membersByName/_membersByKind lookup');\n }\n return result;\n }\n\n /** @internal */\n public _ensureMemberMaps(): void {\n // Build the _membersByName and _membersByKind tables if they don't already exist\n if (this[_membersByName] === undefined) {\n const membersByName: Map<string, ApiItem[]> = new Map<string, ApiItem[]>();\n const membersByKind: Map<string, ApiItem[]> = new Map<string, ApiItem[]>();\n\n for (const member of this[_members]) {\n let map: Map<string, ApiItem[]> | Map<ApiItemKind, ApiItem[]>;\n let key: string | ApiItemKind;\n\n if (ApiNameMixin.isBaseClassOf(member)) {\n map = membersByName;\n key = member.name;\n } else {\n map = membersByKind;\n key = member.kind;\n }\n\n let list: ApiItem[] | undefined = map.get(key);\n if (list === undefined) {\n list = [];\n map.set(key, list);\n }\n list.push(member);\n }\n\n this[_membersByName] = membersByName;\n this[_membersByKind] = membersByKind;\n }\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiItemContainerJson>): void {\n super.serializeInto(jsonObject);\n\n const memberObjects: IApiItemJson[] = [];\n\n for (const member of this.members) {\n const memberJsonObject: Partial<IApiItemJson> = {};\n member.serializeInto(memberJsonObject);\n memberObjects.push(memberJsonObject as IApiItemJson);\n }\n\n jsonObject.preserveMemberOrder = this.preserveMemberOrder;\n jsonObject.members = memberObjects;\n }\n }\n\n return MixedClass;\n}\n\n/**\n * Static members for {@link (ApiItemContainerMixin:interface)}.\n * @public\n */\nexport namespace ApiItemContainerMixin {\n /**\n * A type guard that tests whether the specified `ApiItem` subclass extends the `ApiItemContainerMixin` mixin.\n *\n * @remarks\n *\n * The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of\n * the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however\n * the TypeScript type system cannot invoke a runtime test.)\n */\n export function isBaseClassOf(apiItem: ApiItem): apiItem is ApiItemContainerMixin {\n return apiItem.hasOwnProperty(_members);\n }\n}\n"]}
1
+ {"version":3,"file":"ApiItemContainerMixin.js","sourceRoot":"","sources":["../../src/mixins/ApiItemContainerMixin.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AA2L3D,sDAqVC;AA9gBD,oDAAoD;AAEpD,oEAA6D;AAG7D,8CAO0B;AAC1B,iDAA8C;AAK9C,uCAAgE;AAChE,+DAI+B;AAkB/B,MAAM,QAAQ,GAAkB,MAAM,CAAC,gCAAgC,CAAC,CAAC;AACzE,MAAM,cAAc,GAAkB,MAAM,CAAC,sCAAsC,CAAC,CAAC;AACrF,MAAM,sBAAsB,GAAkB,MAAM,CAAC,8CAA8C,CAAC,CAAC;AACrG,MAAM,cAAc,GAAkB,MAAM,CAAC,sCAAsC,CAAC,CAAC;AACrF,MAAM,cAAc,GAAkB,MAAM,CAAC,sCAAsC,CAAC,CAAC;AACrF,MAAM,oBAAoB,GAAkB,MAAM,CAAC,4CAA4C,CAAC,CAAC;AAmIjG;;;;;;;GAOG;AACH,SAAgB,qBAAqB,CACnC,SAAqB;AACrB,8DAA8D;;IAE9D,MAAM,UAAW,SAAQ,SAAS;QAchC,8DAA8D;QAC9D,YAAmB,GAAG,IAAW;;YAC/B,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;YACf,MAAM,OAAO,GAAkC,IAAI,CAAC,CAAC,CAAkC,CAAC;YAExF,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;YACpB,IAAI,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC;YAC7B,IAAI,CAAC,sBAAsB,CAAC,GAAG,IAAI,GAAG,EAAmB,CAAC;YAC1D,IAAI,CAAC,oBAAoB,CAAC,GAAG,M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CAAC;oBACpB,CAAC;oBAED,IAAI,IAAI,GAA0B,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;oBAC/C,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;wBACvB,IAAI,GAAG,EAAE,CAAC;wBACV,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;oBACrB,CAAC;oBACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACpB,CAAC;gBAED,IAAI,CAAC,cAAc,CAAC,GAAG,aAAa,CAAC;gBACrC,IAAI,CAAC,cAAc,CAAC,GAAG,aAAa,CAAC;YACvC,CAAC;QACH,CAAC;QAED,gBAAgB;QACT,aAAa,CAAC,UAA0C;YAC7D,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAEhC,MAAM,aAAa,GAAmB,EAAE,CAAC;YAEzC,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBAClC,MAAM,gBAAgB,GAA0B,EAAE,CAAC;gBACnD,MAAM,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;gBACvC,aAAa,CAAC,IAAI,CAAC,gBAAgC,CAAC,CAAC;YACvD,CAAC;YAED,UAAU,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC;YAC1D,UAAU,CAAC,OAAO,GAAG,aAAa,CAAC;QACrC,CAAC;KACF;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;GAGG;AACH,WAAiB,qBAAqB;IACpC;;;;;;;;OAQG;IACH,SAAgB,aAAa,CAAC,OAAgB;QAC5C,OAAO,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAFe,mCAAa,gBAE5B,CAAA;AACH,CAAC,EAbgB,qBAAqB,qCAArB,qBAAqB,QAarC","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 @typescript-eslint/no-redeclare */\n\nimport { InternalError } from '@rushstack/node-core-library';\nimport type { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\n\nimport {\n ApiItem,\n apiItem_onParentChanged,\n type IApiItemJson,\n type IApiItemOptions,\n type IApiItemConstructor,\n ApiItemKind\n} from '../items/ApiItem';\nimport { ApiNameMixin } from './ApiNameMixin';\nimport type { DeserializerContext } from '../model/DeserializerContext';\nimport type { ApiModel } from '../model/ApiModel';\nimport type { ApiClass } from '../model/ApiClass';\nimport type { ApiInterface } from '../model/ApiInterface';\nimport { type ExcerptToken, ExcerptTokenKind } from './Excerpt';\nimport {\n type IFindApiItemsResult,\n type IFindApiItemsMessage,\n FindApiItemsMessageId\n} from './IFindApiItemsResult';\nimport type { HeritageType } from '../model/HeritageType';\nimport type { IResolveDeclarationReferenceResult } from '../model/ModelReferenceResolver';\n\n/**\n * Constructor options for {@link (ApiItemContainerMixin:interface)}.\n * @public\n */\nexport interface IApiItemContainerMixinOptions extends IApiItemOptions {\n preserveMemberOrder?: boolean;\n members?: ApiItem[];\n}\n\nexport interface IApiItemContainerJson extends IApiItemJson {\n preserveMemberOrder?: boolean;\n members: IApiItemJson[];\n}\n\nconst _members: unique symbol = Symbol('ApiItemContainerMixin._members');\nconst _membersSorted: unique symbol = Symbol('ApiItemContainerMixin._membersSorted');\nconst _membersByContainerKey: unique symbol = Symbol('ApiItemContainerMixin._membersByContainerKey');\nconst _membersByName: unique symbol = Symbol('ApiItemContainerMixin._membersByName');\nconst _membersByKind: unique symbol = Symbol('ApiItemContainerMixin._membersByKind');\nconst _preserveMemberOrder: unique symbol = Symbol('ApiItemContainerMixin._preserveMemberOrder');\n\n/**\n * The mixin base class for API items that act as containers for other child items.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations. The non-abstract classes (e.g. `ApiClass`, `ApiEnum`, `ApiInterface`, etc.) use\n * TypeScript \"mixin\" functions (e.g. `ApiDeclaredItem`, `ApiItemContainerMixin`, etc.) to add various\n * features that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class\n * to extend more than one base class). The \"mixin\" is a TypeScript merged declaration with three components:\n * the function that generates a subclass, an interface that describes the members of the subclass, and\n * a namespace containing static members of the class.\n *\n * Examples of `ApiItemContainerMixin` child classes include `ApiModel`, `ApiPackage`, `ApiEntryPoint`,\n * and `ApiEnum`. But note that `Parameter` is not considered a \"member\" of an `ApiMethod`; this relationship\n * is modeled using {@link (ApiParameterListMixin:interface).parameters} instead\n * of {@link ApiItem.members}.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ApiItemContainerMixin extends ApiItem {\n /**\n * Disables automatic sorting of {@link ApiItem.members}.\n *\n * @remarks\n * By default `ApiItemContainerMixin` will automatically sort its members according to their\n * {@link ApiItem.getSortKey} string, which provides a standardized mostly alphabetical ordering\n * that is appropriate for most API items. When loading older .api.json files the automatic sorting\n * is reapplied and may update the ordering.\n *\n * Set `preserveMemberOrder` to true to disable automatic sorting for this container; instead, the\n * members will retain whatever ordering appeared in the {@link IApiItemContainerMixinOptions.members} array.\n * The `preserveMemberOrder` option is saved in the .api.json file.\n */\n readonly preserveMemberOrder: boolean;\n\n /**\n * Adds a new member to the container.\n *\n * @remarks\n * An ApiItem cannot be added to more than one container.\n */\n addMember(member: ApiItem): void;\n\n /**\n * Attempts to retrieve a member using its containerKey, or returns `undefined` if no matching member was found.\n *\n * @remarks\n * Use the `getContainerKey()` static member to construct the key. Each subclass has a different implementation\n * of this function, according to the aspects that are important for identifying it.\n *\n * See {@link ApiItem.containerKey} for more information.\n */\n tryGetMemberByKey(containerKey: string): ApiItem | undefined;\n\n /**\n * Returns a list of members with the specified name.\n */\n findMembersByName(name: string): ReadonlyArray<ApiItem>;\n\n /**\n * Finds all of the ApiItem's immediate and inherited members by walking up the inheritance tree.\n *\n * @remarks\n *\n * Given the following class heritage:\n *\n * ```\n * export class A {\n * public a: number|boolean;\n * }\n *\n * export class B extends A {\n * public a: number;\n * public b: string;\n * }\n *\n * export class C extends B {\n * public c: boolean;\n * }\n * ```\n *\n * Calling `findMembersWithInheritance` on `C` will return `B.a`, `B.b`, and `C.c`. Calling the\n * method on `B` will return `B.a` and `B.b`. And calling the method on `A` will return just\n * `A.a`.\n *\n * The inherited members returned by this method may be incomplete. If so, there will be a flag\n * on the result object indicating this as well as messages explaining the errors in more detail.\n * Some scenarios include:\n *\n * - Interface extending from a type alias.\n *\n * - Class extending from a variable.\n *\n * - Extending from a declaration not present in the model (e.g. external package).\n *\n * - Extending from an unexported declaration (e.g. ae-forgotten-export). Common in mixin\n * patterns.\n *\n * - Unexpected runtime errors...\n *\n * Lastly, be aware that the types of inherited members are returned with respect to their\n * defining class as opposed to with respect to the inheriting class. For example, consider\n * the following:\n *\n * ```\n * export class A<T> {\n * public a: T;\n * }\n *\n * export class B extends A<number> {}\n * ```\n *\n * When called on `B`, this method will return `B.a` with type `T` as opposed to type\n * `number`, although the latter is more accurate.\n */\n findMembersWithInheritance(): IFindApiItemsResult;\n\n /**\n * For a given member of this container, return its `ApiItem.getMergedSiblings()` list.\n * @internal\n */\n _getMergedSiblingsForMember(memberApiItem: ApiItem): ReadonlyArray<ApiItem>;\n\n /** @override */\n serializeInto(jsonObject: Partial<IApiItemJson>): void;\n}\n\n/**\n * Mixin function for {@link ApiDeclaredItem}.\n *\n * @param baseClass - The base class to be extended\n * @returns A child class that extends baseClass, adding the {@link (ApiItemContainerMixin:interface)} functionality.\n *\n * @public\n */\nexport function ApiItemContainerMixin<TBaseClass extends IApiItemConstructor>(\n baseClass: TBaseClass\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): TBaseClass & (new (...args: any[]) => ApiItemContainerMixin) {\n class MixedClass extends baseClass implements ApiItemContainerMixin {\n public readonly [_members]: ApiItem[];\n public [_membersSorted]: boolean;\n public [_membersByContainerKey]: Map<string, ApiItem>;\n public [_preserveMemberOrder]: boolean;\n\n // For members of this container that extend ApiNameMixin, this stores the list of members with a given name.\n // Examples include merged declarations, overloaded functions, etc.\n public [_membersByName]: Map<string, ApiItem[]> | undefined;\n\n // For members of this container that do NOT extend ApiNameMixin, this stores the list of members\n // that share a common ApiItemKind. Examples include overloaded constructors or index signatures.\n public [_membersByKind]: Map<string, ApiItem[]> | undefined; // key is ApiItemKind\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(...args: any[]) {\n super(...args);\n const options: IApiItemContainerMixinOptions = args[0] as IApiItemContainerMixinOptions;\n\n this[_members] = [];\n this[_membersSorted] = false;\n this[_membersByContainerKey] = new Map<string, ApiItem>();\n this[_preserveMemberOrder] = options.preserveMemberOrder ?? false;\n\n if (options.members) {\n for (const member of options.members) {\n this.addMember(member);\n }\n }\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiItemContainerMixinOptions>,\n context: DeserializerContext,\n jsonObject: IApiItemContainerJson\n ): void {\n baseClass.onDeserializeInto(options, context, jsonObject);\n options.preserveMemberOrder = jsonObject.preserveMemberOrder;\n options.members = [];\n for (const memberObject of jsonObject.members) {\n options.members.push(ApiItem.deserialize(memberObject, context));\n }\n }\n\n /** @override */\n public get members(): ReadonlyArray<ApiItem> {\n if (!this[_membersSorted] && !this[_preserveMemberOrder]) {\n this[_members].sort((x, y) => x.getSortKey().localeCompare(y.getSortKey()));\n this[_membersSorted] = true;\n }\n\n return this[_members];\n }\n\n public get preserveMemberOrder(): boolean {\n return this[_preserveMemberOrder];\n }\n\n public addMember(member: ApiItem): void {\n if (this[_membersByContainerKey].has(member.containerKey)) {\n throw new Error(\n `Another member has already been added with the same name (${member.displayName})` +\n ` and containerKey (${member.containerKey})`\n );\n }\n\n const existingParent: ApiItem | undefined = member.parent;\n if (existingParent !== undefined) {\n throw new Error(\n `This item has already been added to another container: \"${existingParent.displayName}\"`\n );\n }\n\n this[_members].push(member);\n this[_membersByName] = undefined; // invalidate the lookup\n this[_membersByKind] = undefined; // invalidate the lookup\n this[_membersSorted] = false;\n this[_membersByContainerKey].set(member.containerKey, member);\n\n member[apiItem_onParentChanged](this);\n }\n\n public tryGetMemberByKey(containerKey: string): ApiItem | undefined {\n return this[_membersByContainerKey].get(containerKey);\n }\n\n public findMembersByName(name: string): ReadonlyArray<ApiItem> {\n this._ensureMemberMaps();\n return this[_membersByName]!.get(name) || [];\n }\n\n public findMembersWithInheritance(): IFindApiItemsResult {\n const messages: IFindApiItemsMessage[] = [];\n let maybeIncompleteResult: boolean = false;\n\n // For API items that don't support inheritance, this method just returns the item's\n // immediate members.\n switch (this.kind) {\n case ApiItemKind.Class:\n case ApiItemKind.Interface:\n break;\n default: {\n return {\n items: this.members.concat(),\n messages,\n maybeIncompleteResult\n };\n }\n }\n\n const membersByName: Map<string, ApiItem[]> = new Map();\n const membersByKind: Map<ApiItemKind, ApiItem[]> = new Map();\n\n const toVisit: ApiItem[] = [];\n let next: ApiItem | undefined = this;\n\n while (next) {\n const membersToAdd: ApiItem[] = [];\n\n // For each member, check to see if we've already seen a member with the same name\n // previously in the inheritance tree. If so, we know we won't inherit it, and thus\n // do not add it to our `membersToAdd` array.\n for (const member of next.members) {\n // We add the to-be-added members to an intermediate array instead of immediately\n // to the maps themselves to support method overloads with the same name.\n if (ApiNameMixin.isBaseClassOf(member)) {\n if (!membersByName.has(member.name)) {\n membersToAdd.push(member);\n }\n } else {\n if (!membersByKind.has(member.kind)) {\n membersToAdd.push(member);\n }\n }\n }\n\n for (const member of membersToAdd) {\n if (ApiNameMixin.isBaseClassOf(member)) {\n const members: ApiItem[] = membersByName.get(member.name) || [];\n members.push(member);\n membersByName.set(member.name, members);\n } else {\n const members: ApiItem[] = membersByKind.get(member.kind) || [];\n members.push(member);\n membersByKind.set(member.kind, members);\n }\n }\n\n // Interfaces can extend multiple interfaces, so iterate through all of them.\n const extendedItems: ApiItem[] = [];\n let extendsTypes: readonly HeritageType[] | undefined;\n\n switch (next.kind) {\n case ApiItemKind.Class: {\n const apiClass: ApiClass = next as ApiClass;\n extendsTypes = apiClass.extendsType ? [apiClass.extendsType] : [];\n break;\n }\n case ApiItemKind.Interface: {\n const apiInterface: ApiInterface = next as ApiInterface;\n extendsTypes = apiInterface.extendsTypes;\n break;\n }\n }\n\n if (extendsTypes === undefined) {\n messages.push({\n messageId: FindApiItemsMessageId.UnsupportedKind,\n text: `Unable to analyze references of API item ${next.displayName} because it is of unsupported kind ${next.kind}`\n });\n maybeIncompleteResult = true;\n next = toVisit.shift();\n continue;\n }\n\n for (const extendsType of extendsTypes) {\n // We want to find the reference token associated with the actual inherited declaration.\n // In every case we support, this is the first reference token. For example:\n //\n // ```\n // export class A extends B {}\n // ^\n // export class A extends B<C> {}\n // ^\n // export class A extends B.C {}\n // ^^^\n // ```\n const firstReferenceToken: ExcerptToken | undefined = extendsType.excerpt.spannedTokens.find(\n (token: ExcerptToken) => {\n return token.kind === ExcerptTokenKind.Reference && token.canonicalReference;\n }\n );\n\n if (!firstReferenceToken) {\n messages.push({\n messageId: FindApiItemsMessageId.ExtendsClauseMissingReference,\n text: `Unable to analyze extends clause ${extendsType.excerpt.text} of API item ${next.displayName} because no canonical reference was found`\n });\n maybeIncompleteResult = true;\n continue;\n }\n\n const apiModel: ApiModel | undefined = this.getAssociatedModel();\n if (!apiModel) {\n messages.push({\n messageId: FindApiItemsMessageId.NoAssociatedApiModel,\n text: `Unable to analyze references of API item ${next.displayName} because it is not associated with an ApiModel`\n });\n maybeIncompleteResult = true;\n continue;\n }\n\n const canonicalReference: DeclarationReference = firstReferenceToken.canonicalReference!;\n const apiItemResult: IResolveDeclarationReferenceResult = apiModel.resolveDeclarationReference(\n canonicalReference,\n undefined\n );\n\n const apiItem: ApiItem | undefined = apiItemResult.resolvedApiItem;\n if (!apiItem) {\n messages.push({\n messageId: FindApiItemsMessageId.DeclarationResolutionFailed,\n text: `Unable to resolve declaration reference within API item ${next.displayName}: ${apiItemResult.errorMessage}`\n });\n maybeIncompleteResult = true;\n continue;\n }\n\n extendedItems.push(apiItem);\n }\n\n // For classes, this array will only have one item. For interfaces, there may be multiple items. Sort the array\n // into alphabetical order before adding to our list of API items to visit. This ensures that in the case\n // of multiple interface inheritance, a member inherited from multiple interfaces is attributed to the interface\n // earlier in alphabetical order (as opposed to source order).\n //\n // For example, in the code block below, `Bar.x` is reported as the inherited item, not `Foo.x`.\n //\n // ```\n // interface Foo {\n // public x: string;\n // }\n //\n // interface Bar {\n // public x: string;\n // }\n //\n // interface FooBar extends Foo, Bar {}\n // ```\n extendedItems.sort((x: ApiItem, y: ApiItem) => x.getSortKey().localeCompare(y.getSortKey()));\n\n toVisit.push(...extendedItems);\n next = toVisit.shift();\n }\n\n const items: ApiItem[] = [];\n for (const members of membersByName.values()) {\n items.push(...members);\n }\n for (const members of membersByKind.values()) {\n items.push(...members);\n }\n items.sort((x: ApiItem, y: ApiItem) => x.getSortKey().localeCompare(y.getSortKey()));\n\n return {\n items,\n messages,\n maybeIncompleteResult\n };\n }\n\n /** @internal */\n public _getMergedSiblingsForMember(memberApiItem: ApiItem): ReadonlyArray<ApiItem> {\n this._ensureMemberMaps();\n let result: ApiItem[] | undefined;\n if (ApiNameMixin.isBaseClassOf(memberApiItem)) {\n result = this[_membersByName]!.get(memberApiItem.name);\n } else {\n result = this[_membersByKind]!.get(memberApiItem.kind);\n }\n if (!result) {\n throw new InternalError('Item was not found in the _membersByName/_membersByKind lookup');\n }\n return result;\n }\n\n /** @internal */\n public _ensureMemberMaps(): void {\n // Build the _membersByName and _membersByKind tables if they don't already exist\n if (this[_membersByName] === undefined) {\n const membersByName: Map<string, ApiItem[]> = new Map<string, ApiItem[]>();\n const membersByKind: Map<string, ApiItem[]> = new Map<string, ApiItem[]>();\n\n for (const member of this[_members]) {\n let map: Map<string, ApiItem[]> | Map<ApiItemKind, ApiItem[]>;\n let key: string | ApiItemKind;\n\n if (ApiNameMixin.isBaseClassOf(member)) {\n map = membersByName;\n key = member.name;\n } else {\n map = membersByKind;\n key = member.kind;\n }\n\n let list: ApiItem[] | undefined = map.get(key);\n if (list === undefined) {\n list = [];\n map.set(key, list);\n }\n list.push(member);\n }\n\n this[_membersByName] = membersByName;\n this[_membersByKind] = membersByKind;\n }\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiItemContainerJson>): void {\n super.serializeInto(jsonObject);\n\n const memberObjects: IApiItemJson[] = [];\n\n for (const member of this.members) {\n const memberJsonObject: Partial<IApiItemJson> = {};\n member.serializeInto(memberJsonObject);\n memberObjects.push(memberJsonObject as IApiItemJson);\n }\n\n jsonObject.preserveMemberOrder = this.preserveMemberOrder;\n jsonObject.members = memberObjects;\n }\n }\n\n return MixedClass;\n}\n\n/**\n * Static members for {@link (ApiItemContainerMixin:interface)}.\n * @public\n */\nexport namespace ApiItemContainerMixin {\n /**\n * A type guard that tests whether the specified `ApiItem` subclass extends the `ApiItemContainerMixin` mixin.\n *\n * @remarks\n *\n * The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of\n * the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however\n * the TypeScript type system cannot invoke a runtime test.)\n */\n export function isBaseClassOf(apiItem: ApiItem): apiItem is ApiItemContainerMixin {\n return apiItem.hasOwnProperty(_members);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiParameterListMixin.d.ts","sourceRoot":"","sources":["../../src/mixins/ApiParameterListMixin.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpG,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAIpD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,uBAAuB,EAAE,kBAAkB,CAAC;IAC5C,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA8B,SAAQ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AC5C,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA8B,SAAQ,eAAe;IACpE,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACpC;AAKD;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,qBAAsB,SAAQ,OAAO;IACpD;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAE9C,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;CACxD;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,SAAS,mBAAmB,EAC1E,SAAS,EAAE,UAAU,GAEpB,UAAU,GAAG,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,qBAAqB,CAAC,CAyE9D;AAED;;;GAGG;AACH,yBAAiB,qBAAqB,CAAC;IACrC;;;;;;;;OAQG;IACH,SAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,qBAAqB,CAEhF;CACF"}
@@ -3,9 +3,10 @@
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.ApiParameterListMixin = ApiParameterListMixin;
6
+ /* eslint-disable @typescript-eslint/no-redeclare */
7
+ const node_core_library_1 = require("@rushstack/node-core-library");
6
8
  const Parameter_1 = require("../model/Parameter");
7
9
  const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
8
- const node_core_library_1 = require("@rushstack/node-core-library");
9
10
  const _overloadIndex = Symbol('ApiParameterListMixin._overloadIndex');
10
11
  const _parameters = Symbol('ApiParameterListMixin._parameters');
11
12
  /**