@microsoft/api-extractor-model 7.9.7 → 7.10.3

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 (141) hide show
  1. package/CHANGELOG.json +75 -0
  2. package/CHANGELOG.md +29 -1
  3. package/README.md +9 -0
  4. package/dist/rollup.d.ts +62 -62
  5. package/dist/tsdoc-metadata.json +1 -1
  6. package/lib/aedoc/AedocDefinitions.d.ts +1 -1
  7. package/lib/aedoc/AedocDefinitions.d.ts.map +1 -1
  8. package/lib/aedoc/AedocDefinitions.js +2 -1
  9. package/lib/aedoc/AedocDefinitions.js.map +1 -1
  10. package/lib/aedoc/ReleaseTag.js +1 -0
  11. package/lib/aedoc/ReleaseTag.js.map +1 -1
  12. package/lib/index.js +37 -37
  13. package/lib/index.js.map +1 -1
  14. package/lib/items/ApiDeclaredItem.d.ts +2 -2
  15. package/lib/items/ApiDeclaredItem.d.ts.map +1 -1
  16. package/lib/items/ApiDeclaredItem.js +1 -0
  17. package/lib/items/ApiDeclaredItem.js.map +1 -1
  18. package/lib/items/ApiDocumentedItem.d.ts +1 -1
  19. package/lib/items/ApiDocumentedItem.d.ts.map +1 -1
  20. package/lib/items/ApiDocumentedItem.js +21 -1
  21. package/lib/items/ApiDocumentedItem.js.map +1 -1
  22. package/lib/items/ApiItem.d.ts +6 -6
  23. package/lib/items/ApiItem.d.ts.map +1 -1
  24. package/lib/items/ApiItem.js +1 -0
  25. package/lib/items/ApiItem.js.map +1 -1
  26. package/lib/items/ApiPropertyItem.d.ts +1 -1
  27. package/lib/items/ApiPropertyItem.d.ts.map +1 -1
  28. package/lib/items/ApiPropertyItem.js +1 -0
  29. package/lib/items/ApiPropertyItem.js.map +1 -1
  30. package/lib/mixins/ApiItemContainerMixin.js +1 -0
  31. package/lib/mixins/ApiItemContainerMixin.js.map +1 -1
  32. package/lib/mixins/ApiNameMixin.js +1 -0
  33. package/lib/mixins/ApiNameMixin.js.map +1 -1
  34. package/lib/mixins/ApiParameterListMixin.js +1 -0
  35. package/lib/mixins/ApiParameterListMixin.js.map +1 -1
  36. package/lib/mixins/ApiReleaseTagMixin.d.ts.map +1 -1
  37. package/lib/mixins/ApiReleaseTagMixin.js +4 -1
  38. package/lib/mixins/ApiReleaseTagMixin.js.map +1 -1
  39. package/lib/mixins/ApiReturnTypeMixin.js +1 -0
  40. package/lib/mixins/ApiReturnTypeMixin.js.map +1 -1
  41. package/lib/mixins/ApiStaticMixin.js +1 -0
  42. package/lib/mixins/ApiStaticMixin.js.map +1 -1
  43. package/lib/mixins/ApiTypeParameterListMixin.js +1 -0
  44. package/lib/mixins/ApiTypeParameterListMixin.js.map +1 -1
  45. package/lib/mixins/Excerpt.d.ts +5 -5
  46. package/lib/mixins/Excerpt.d.ts.map +1 -1
  47. package/lib/mixins/Excerpt.js +1 -0
  48. package/lib/mixins/Excerpt.js.map +1 -1
  49. package/lib/model/ApiCallSignature.d.ts +2 -2
  50. package/lib/model/ApiCallSignature.d.ts.map +1 -1
  51. package/lib/model/ApiCallSignature.js +1 -0
  52. package/lib/model/ApiCallSignature.js.map +1 -1
  53. package/lib/model/ApiClass.d.ts +3 -3
  54. package/lib/model/ApiClass.d.ts.map +1 -1
  55. package/lib/model/ApiClass.js +1 -0
  56. package/lib/model/ApiClass.js.map +1 -1
  57. package/lib/model/ApiConstructSignature.d.ts +2 -2
  58. package/lib/model/ApiConstructSignature.d.ts.map +1 -1
  59. package/lib/model/ApiConstructSignature.js +1 -0
  60. package/lib/model/ApiConstructSignature.js.map +1 -1
  61. package/lib/model/ApiConstructor.d.ts +2 -2
  62. package/lib/model/ApiConstructor.d.ts.map +1 -1
  63. package/lib/model/ApiConstructor.js +1 -0
  64. package/lib/model/ApiConstructor.js.map +1 -1
  65. package/lib/model/ApiEntryPoint.d.ts +3 -3
  66. package/lib/model/ApiEntryPoint.d.ts.map +1 -1
  67. package/lib/model/ApiEntryPoint.js +1 -0
  68. package/lib/model/ApiEntryPoint.js.map +1 -1
  69. package/lib/model/ApiEnum.d.ts +3 -3
  70. package/lib/model/ApiEnum.d.ts.map +1 -1
  71. package/lib/model/ApiEnum.js +1 -0
  72. package/lib/model/ApiEnum.js.map +1 -1
  73. package/lib/model/ApiEnumMember.d.ts +2 -2
  74. package/lib/model/ApiEnumMember.d.ts.map +1 -1
  75. package/lib/model/ApiEnumMember.js +1 -0
  76. package/lib/model/ApiEnumMember.js.map +1 -1
  77. package/lib/model/ApiFunction.d.ts +2 -2
  78. package/lib/model/ApiFunction.d.ts.map +1 -1
  79. package/lib/model/ApiFunction.js +1 -0
  80. package/lib/model/ApiFunction.js.map +1 -1
  81. package/lib/model/ApiIndexSignature.d.ts +2 -2
  82. package/lib/model/ApiIndexSignature.d.ts.map +1 -1
  83. package/lib/model/ApiIndexSignature.js +1 -0
  84. package/lib/model/ApiIndexSignature.js.map +1 -1
  85. package/lib/model/ApiInterface.d.ts +3 -3
  86. package/lib/model/ApiInterface.d.ts.map +1 -1
  87. package/lib/model/ApiInterface.js +1 -0
  88. package/lib/model/ApiInterface.js.map +1 -1
  89. package/lib/model/ApiMethod.d.ts +2 -2
  90. package/lib/model/ApiMethod.d.ts.map +1 -1
  91. package/lib/model/ApiMethod.js +1 -0
  92. package/lib/model/ApiMethod.js.map +1 -1
  93. package/lib/model/ApiMethodSignature.d.ts +2 -2
  94. package/lib/model/ApiMethodSignature.d.ts.map +1 -1
  95. package/lib/model/ApiMethodSignature.js +1 -0
  96. package/lib/model/ApiMethodSignature.js.map +1 -1
  97. package/lib/model/ApiModel.d.ts +3 -3
  98. package/lib/model/ApiModel.d.ts.map +1 -1
  99. package/lib/model/ApiModel.js +1 -0
  100. package/lib/model/ApiModel.js.map +1 -1
  101. package/lib/model/ApiNamespace.d.ts +2 -2
  102. package/lib/model/ApiNamespace.d.ts.map +1 -1
  103. package/lib/model/ApiNamespace.js +1 -0
  104. package/lib/model/ApiNamespace.js.map +1 -1
  105. package/lib/model/ApiPackage.d.ts +3 -3
  106. package/lib/model/ApiPackage.d.ts.map +1 -1
  107. package/lib/model/ApiPackage.js +1 -0
  108. package/lib/model/ApiPackage.js.map +1 -1
  109. package/lib/model/ApiProperty.d.ts +2 -2
  110. package/lib/model/ApiProperty.d.ts.map +1 -1
  111. package/lib/model/ApiProperty.js +1 -0
  112. package/lib/model/ApiProperty.js.map +1 -1
  113. package/lib/model/ApiPropertySignature.d.ts +2 -2
  114. package/lib/model/ApiPropertySignature.d.ts.map +1 -1
  115. package/lib/model/ApiPropertySignature.js +1 -0
  116. package/lib/model/ApiPropertySignature.js.map +1 -1
  117. package/lib/model/ApiTypeAlias.d.ts +2 -2
  118. package/lib/model/ApiTypeAlias.d.ts.map +1 -1
  119. package/lib/model/ApiTypeAlias.js +1 -0
  120. package/lib/model/ApiTypeAlias.js.map +1 -1
  121. package/lib/model/ApiVariable.d.ts +2 -2
  122. package/lib/model/ApiVariable.d.ts.map +1 -1
  123. package/lib/model/ApiVariable.js +1 -0
  124. package/lib/model/ApiVariable.js.map +1 -1
  125. package/lib/model/Deserializer.js +1 -0
  126. package/lib/model/Deserializer.js.map +1 -1
  127. package/lib/model/DeserializerContext.js +1 -0
  128. package/lib/model/DeserializerContext.js.map +1 -1
  129. package/lib/model/HeritageType.js +1 -0
  130. package/lib/model/HeritageType.js.map +1 -1
  131. package/lib/model/ModelReferenceResolver.js +1 -0
  132. package/lib/model/ModelReferenceResolver.js.map +1 -1
  133. package/lib/model/Parameter.d.ts +1 -1
  134. package/lib/model/Parameter.d.ts.map +1 -1
  135. package/lib/model/Parameter.js +1 -0
  136. package/lib/model/Parameter.js.map +1 -1
  137. package/lib/model/TypeParameter.d.ts +1 -1
  138. package/lib/model/TypeParameter.d.ts.map +1 -1
  139. package/lib/model/TypeParameter.js +1 -0
  140. package/lib/model/TypeParameter.js.map +1 -1
  141. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"ApiModel.js","sourceRoot":"","sources":["../../src/model/ApiModel.ts"],"names":[],"mappings":";AAAA,4FAA4F;A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AC,SAAS,EAAE,4BAA4B,CAAC,CAAC;aACtE;SACF;IACH,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,OAAO,2CAAoB,CAAC,KAAK,EAAE,CAAC;IACtC,CAAC;CACF;AApJD,4BAoJC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { DeclarationReference } from '@microsoft/tsdoc/lib/beta/DeclarationReference';\r\nimport { ApiItem, ApiItemKind } from '../items/ApiItem';\r\nimport { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin';\r\nimport { ApiPackage } from './ApiPackage';\r\nimport { PackageName } from '@rushstack/node-core-library';\r\nimport { ModelReferenceResolver, IResolveDeclarationReferenceResult } from './ModelReferenceResolver';\r\nimport { DocDeclarationReference } from '@microsoft/tsdoc';\r\n\r\n/**\r\n * A serializable representation of a collection of API declarations.\r\n *\r\n * @remarks\r\n *\r\n * An `ApiModel` represents a collection of API declarations that can be serialized to disk. It captures all the\r\n * important information needed to generate documentation, without any reliance on the TypeScript compiler engine.\r\n *\r\n * An `ApiModel` acts as the root of a tree of objects that all inherit from the `ApiItem` base class.\r\n * The tree children are determined by the {@link (ApiItemContainerMixin:interface)} mixin base class. The model\r\n * contains packages. Packages have an entry point (today, only one). And the entry point can contain various types\r\n * of API declarations. The container relationships might look like this:\r\n *\r\n * ```\r\n * Things that can contain other things:\r\n *\r\n * - ApiModel\r\n * - ApiPackage\r\n * - ApiEntryPoint\r\n * - ApiClass\r\n * - ApiMethod\r\n * - ApiProperty\r\n * - ApiEnum\r\n * - ApiEnumMember\r\n * - ApiInterface\r\n * - ApiMethodSignature\r\n * - ApiPropertySignature\r\n * - ApiNamespace\r\n * - (ApiClass, ApiEnum, ApiInterace, ...)\r\n *\r\n * ```\r\n *\r\n * Normally, API Extractor writes an .api.json file to disk for each project that it builds. Then, a tool like\r\n * API Documenter can load the various `ApiPackage` objects into a single `ApiModel` and process them as a group.\r\n * This is useful because compilation generally occurs separately (e.g. because projects may reside in different\r\n * Git repos, or because they build with different TypeScript compiler configurations that may be incompatible),\r\n * whereas API Documenter cannot detect broken hyperlinks without seeing the entire documentation set.\r\n *\r\n * @public\r\n */\r\nexport class ApiModel extends ApiItemContainerMixin(ApiItem) {\r\n private readonly _resolver: ModelReferenceResolver;\r\n\r\n private _packagesByName: Map<string, ApiPackage> | undefined = undefined;\r\n private _apiItemsByCanonicalReference: Map<string, ApiItem> | undefined = undefined;\r\n public constructor() {\r\n super({});\r\n\r\n this._resolver = new ModelReferenceResolver(this);\r\n }\r\n\r\n public loadPackage(apiJsonFilename: string): ApiPackage {\r\n const apiPackage: ApiPackage = ApiPackage.loadFromJsonFile(apiJsonFilename);\r\n this.addMember(apiPackage);\r\n return apiPackage;\r\n }\r\n\r\n /** @override */\r\n public get kind(): ApiItemKind {\r\n return ApiItemKind.Model;\r\n }\r\n\r\n /** @override */\r\n public get containerKey(): string {\r\n return '';\r\n }\r\n\r\n public get packages(): ReadonlyArray<ApiPackage> {\r\n return this.members as ReadonlyArray<ApiPackage>;\r\n }\r\n\r\n /** @override */\r\n public addMember(member: ApiPackage): void {\r\n if (member.kind !== ApiItemKind.Package) {\r\n throw new Error('Only items of type ApiPackage may be added to an ApiModel');\r\n }\r\n super.addMember(member);\r\n this._packagesByName = undefined; // invalidate the cache\r\n this._apiItemsByCanonicalReference = undefined; // invalidate the cache\r\n }\r\n\r\n /**\r\n * Efficiently finds a package by the NPM package name.\r\n *\r\n * @remarks\r\n *\r\n * If the NPM scope is omitted in the package name, it will still be found provided that it is an unambiguous match.\r\n * For example, it's often convenient to write `{@link node-core-library#JsonFile}` instead of\r\n * `{@link @rushstack/node-core-library#JsonFile}`.\r\n */\r\n public tryGetPackageByName(packageName: string): ApiPackage | undefined {\r\n // Build the lookup on demand\r\n if (this._packagesByName === undefined) {\r\n this._packagesByName = new Map<string, ApiPackage>();\r\n\r\n const unscopedMap: Map<string, ApiPackage | undefined> = new Map<string, ApiPackage | undefined>();\r\n\r\n for (const apiPackage of this.packages) {\r\n if (this._packagesByName.get(apiPackage.name)) {\r\n // This should not happen\r\n throw new Error(`The model contains multiple packages with the name ${apiPackage.name}`);\r\n }\r\n\r\n this._packagesByName.set(apiPackage.name, apiPackage);\r\n\r\n const unscopedName: string = PackageName.parse(apiPackage.name).unscopedName;\r\n\r\n if (unscopedMap.has(unscopedName)) {\r\n // If another package has the same unscoped name, then we won't register it\r\n unscopedMap.set(unscopedName, undefined);\r\n } else {\r\n unscopedMap.set(unscopedName, apiPackage);\r\n }\r\n }\r\n\r\n for (const [unscopedName, apiPackage] of unscopedMap) {\r\n if (apiPackage) {\r\n if (!this._packagesByName.has(unscopedName)) {\r\n // If the unscoped name is unambiguous, then we can also use it as a lookup\r\n this._packagesByName.set(unscopedName, apiPackage);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return this._packagesByName.get(packageName);\r\n }\r\n\r\n public resolveDeclarationReference(\r\n declarationReference: DocDeclarationReference | DeclarationReference,\r\n contextApiItem: ApiItem | undefined\r\n ): IResolveDeclarationReferenceResult {\r\n if (declarationReference instanceof DocDeclarationReference) {\r\n return this._resolver.resolve(declarationReference, contextApiItem);\r\n } else if (declarationReference instanceof DeclarationReference) {\r\n // use this._apiItemsByCanonicalReference to look up ApiItem\r\n\r\n // Build the lookup on demand\r\n if (!this._apiItemsByCanonicalReference) {\r\n this._apiItemsByCanonicalReference = new Map<string, ApiItem>();\r\n\r\n for (const apiPackage of this.packages) {\r\n this._initApiItemsRecursive(apiPackage, this._apiItemsByCanonicalReference);\r\n }\r\n }\r\n\r\n const result: IResolveDeclarationReferenceResult = {\r\n resolvedApiItem: undefined,\r\n errorMessage: undefined\r\n };\r\n\r\n const apiItem: ApiItem | undefined = this._apiItemsByCanonicalReference.get(\r\n declarationReference.toString()\r\n );\r\n\r\n if (!apiItem) {\r\n result.errorMessage = `${declarationReference.toString()} can not be located`;\r\n } else {\r\n result.resolvedApiItem = apiItem;\r\n }\r\n\r\n return result;\r\n } else {\r\n // NOTE: The \"instanceof DeclarationReference\" test assumes a specific version of the @microsoft/tsdoc package.\r\n throw new Error(\r\n 'The \"declarationReference\" parameter must be an instance of' +\r\n ' DocDeclarationReference or DeclarationReference'\r\n );\r\n }\r\n }\r\n\r\n private _initApiItemsRecursive(apiItem: ApiItem, apiItemsByCanonicalReference: Map<string, ApiItem>): void {\r\n if (apiItem.canonicalReference && !apiItem.canonicalReference.isEmpty) {\r\n apiItemsByCanonicalReference.set(apiItem.canonicalReference.toString(), apiItem);\r\n }\r\n\r\n // Recurse container members\r\n if (ApiItemContainerMixin.isBaseClassOf(apiItem)) {\r\n for (const apiMember of apiItem.members) {\r\n this._initApiItemsRecursive(apiMember, apiItemsByCanonicalReference);\r\n }\r\n }\r\n }\r\n\r\n /** @beta @override */\r\n public buildCanonicalReference(): DeclarationReference {\r\n return DeclarationReference.empty();\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ApiModel.js","sourceRoot":"","sources":["../../src/model/ApiModel.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,yFAAsF;AACtF,8CAAwD;AACxD,2EAAwE;AACxE,6CAA0C;AAC1C,oEAA2D;AAC3D,qEAAsG;AACtG,4CAA2D;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAa,QAAS,SAAQ,6CAAqB,CAAC,iBAAO,CAAC;IAK1D;QACE,KAAK,CAAC,EAAE,CAAC,CAAC;QAHJ,oBAAe,GAAwC,SAAS,CAAC;QACjE,kCAA6B,GAAqC,SAAS,CAAC;QAIlF,IAAI,CAAC,SAAS,GAAG,IAAI,+CAAsB,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IAEM,WAAW,CAAC,eAAuB;QACxC,MAAM,UAAU,GAAe,uBAAU,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;QAC5E,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;Q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O,EAAE;gBACZ,MAAM,CAAC,YAAY,GAAG,GAAG,oBAAoB,CAAC,QAAQ,EAAE,qBAAqB,CAAC;aAC/E;iBAAM;gBACL,MAAM,CAAC,eAAe,GAAG,OAAO,CAAC;aAClC;YAED,OAAO,MAAM,CAAC;SACf;aAAM;YACL,+GAA+G;YAC/G,MAAM,IAAI,KAAK,CACb,6DAA6D;gBAC3D,kDAAkD,CACrD,CAAC;SACH;IACH,CAAC;IAEO,sBAAsB,CAAC,OAAgB,EAAE,4BAAkD;QACjG,IAAI,OAAO,CAAC,kBAAkB,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,OAAO,EAAE;YACrE,4BAA4B,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;SAClF;QAED,4BAA4B;QAC5B,IAAI,6CAAqB,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE;YAChD,KAAK,MAAM,SAAS,IAAI,OAAO,CAAC,OAAO,EAAE;gBACvC,IAAI,CAAC,sBAAsB,CAAC,SAAS,EAAE,4BAA4B,CAAC,CAAC;aACtE;SACF;IACH,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,OAAO,2CAAoB,CAAC,KAAK,EAAE,CAAC;IACtC,CAAC;CACF;AApJD,4BAoJC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { DeclarationReference } from '@microsoft/tsdoc/lib/beta/DeclarationReference';\r\nimport { ApiItem, ApiItemKind } from '../items/ApiItem';\r\nimport { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin';\r\nimport { ApiPackage } from './ApiPackage';\r\nimport { PackageName } from '@rushstack/node-core-library';\r\nimport { ModelReferenceResolver, IResolveDeclarationReferenceResult } from './ModelReferenceResolver';\r\nimport { DocDeclarationReference } from '@microsoft/tsdoc';\r\n\r\n/**\r\n * A serializable representation of a collection of API declarations.\r\n *\r\n * @remarks\r\n *\r\n * An `ApiModel` represents a collection of API declarations that can be serialized to disk. It captures all the\r\n * important information needed to generate documentation, without any reliance on the TypeScript compiler engine.\r\n *\r\n * An `ApiModel` acts as the root of a tree of objects that all inherit from the `ApiItem` base class.\r\n * The tree children are determined by the {@link (ApiItemContainerMixin:interface)} mixin base class. The model\r\n * contains packages. Packages have an entry point (today, only one). And the entry point can contain various types\r\n * of API declarations. The container relationships might look like this:\r\n *\r\n * ```\r\n * Things that can contain other things:\r\n *\r\n * - ApiModel\r\n * - ApiPackage\r\n * - ApiEntryPoint\r\n * - ApiClass\r\n * - ApiMethod\r\n * - ApiProperty\r\n * - ApiEnum\r\n * - ApiEnumMember\r\n * - ApiInterface\r\n * - ApiMethodSignature\r\n * - ApiPropertySignature\r\n * - ApiNamespace\r\n * - (ApiClass, ApiEnum, ApiInterace, ...)\r\n *\r\n * ```\r\n *\r\n * Normally, API Extractor writes an .api.json file to disk for each project that it builds. Then, a tool like\r\n * API Documenter can load the various `ApiPackage` objects into a single `ApiModel` and process them as a group.\r\n * This is useful because compilation generally occurs separately (e.g. because projects may reside in different\r\n * Git repos, or because they build with different TypeScript compiler configurations that may be incompatible),\r\n * whereas API Documenter cannot detect broken hyperlinks without seeing the entire documentation set.\r\n *\r\n * @public\r\n */\r\nexport class ApiModel extends ApiItemContainerMixin(ApiItem) {\r\n private readonly _resolver: ModelReferenceResolver;\r\n\r\n private _packagesByName: Map<string, ApiPackage> | undefined = undefined;\r\n private _apiItemsByCanonicalReference: Map<string, ApiItem> | undefined = undefined;\r\n public constructor() {\r\n super({});\r\n\r\n this._resolver = new ModelReferenceResolver(this);\r\n }\r\n\r\n public loadPackage(apiJsonFilename: string): ApiPackage {\r\n const apiPackage: ApiPackage = ApiPackage.loadFromJsonFile(apiJsonFilename);\r\n this.addMember(apiPackage);\r\n return apiPackage;\r\n }\r\n\r\n /** @override */\r\n public get kind(): ApiItemKind {\r\n return ApiItemKind.Model;\r\n }\r\n\r\n /** @override */\r\n public get containerKey(): string {\r\n return '';\r\n }\r\n\r\n public get packages(): ReadonlyArray<ApiPackage> {\r\n return this.members as ReadonlyArray<ApiPackage>;\r\n }\r\n\r\n /** @override */\r\n public addMember(member: ApiPackage): void {\r\n if (member.kind !== ApiItemKind.Package) {\r\n throw new Error('Only items of type ApiPackage may be added to an ApiModel');\r\n }\r\n super.addMember(member);\r\n this._packagesByName = undefined; // invalidate the cache\r\n this._apiItemsByCanonicalReference = undefined; // invalidate the cache\r\n }\r\n\r\n /**\r\n * Efficiently finds a package by the NPM package name.\r\n *\r\n * @remarks\r\n *\r\n * If the NPM scope is omitted in the package name, it will still be found provided that it is an unambiguous match.\r\n * For example, it's often convenient to write `{@link node-core-library#JsonFile}` instead of\r\n * `{@link @rushstack/node-core-library#JsonFile}`.\r\n */\r\n public tryGetPackageByName(packageName: string): ApiPackage | undefined {\r\n // Build the lookup on demand\r\n if (this._packagesByName === undefined) {\r\n this._packagesByName = new Map<string, ApiPackage>();\r\n\r\n const unscopedMap: Map<string, ApiPackage | undefined> = new Map<string, ApiPackage | undefined>();\r\n\r\n for (const apiPackage of this.packages) {\r\n if (this._packagesByName.get(apiPackage.name)) {\r\n // This should not happen\r\n throw new Error(`The model contains multiple packages with the name ${apiPackage.name}`);\r\n }\r\n\r\n this._packagesByName.set(apiPackage.name, apiPackage);\r\n\r\n const unscopedName: string = PackageName.parse(apiPackage.name).unscopedName;\r\n\r\n if (unscopedMap.has(unscopedName)) {\r\n // If another package has the same unscoped name, then we won't register it\r\n unscopedMap.set(unscopedName, undefined);\r\n } else {\r\n unscopedMap.set(unscopedName, apiPackage);\r\n }\r\n }\r\n\r\n for (const [unscopedName, apiPackage] of unscopedMap) {\r\n if (apiPackage) {\r\n if (!this._packagesByName.has(unscopedName)) {\r\n // If the unscoped name is unambiguous, then we can also use it as a lookup\r\n this._packagesByName.set(unscopedName, apiPackage);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return this._packagesByName.get(packageName);\r\n }\r\n\r\n public resolveDeclarationReference(\r\n declarationReference: DocDeclarationReference | DeclarationReference,\r\n contextApiItem: ApiItem | undefined\r\n ): IResolveDeclarationReferenceResult {\r\n if (declarationReference instanceof DocDeclarationReference) {\r\n return this._resolver.resolve(declarationReference, contextApiItem);\r\n } else if (declarationReference instanceof DeclarationReference) {\r\n // use this._apiItemsByCanonicalReference to look up ApiItem\r\n\r\n // Build the lookup on demand\r\n if (!this._apiItemsByCanonicalReference) {\r\n this._apiItemsByCanonicalReference = new Map<string, ApiItem>();\r\n\r\n for (const apiPackage of this.packages) {\r\n this._initApiItemsRecursive(apiPackage, this._apiItemsByCanonicalReference);\r\n }\r\n }\r\n\r\n const result: IResolveDeclarationReferenceResult = {\r\n resolvedApiItem: undefined,\r\n errorMessage: undefined\r\n };\r\n\r\n const apiItem: ApiItem | undefined = this._apiItemsByCanonicalReference.get(\r\n declarationReference.toString()\r\n );\r\n\r\n if (!apiItem) {\r\n result.errorMessage = `${declarationReference.toString()} can not be located`;\r\n } else {\r\n result.resolvedApiItem = apiItem;\r\n }\r\n\r\n return result;\r\n } else {\r\n // NOTE: The \"instanceof DeclarationReference\" test assumes a specific version of the @microsoft/tsdoc package.\r\n throw new Error(\r\n 'The \"declarationReference\" parameter must be an instance of' +\r\n ' DocDeclarationReference or DeclarationReference'\r\n );\r\n }\r\n }\r\n\r\n private _initApiItemsRecursive(apiItem: ApiItem, apiItemsByCanonicalReference: Map<string, ApiItem>): void {\r\n if (apiItem.canonicalReference && !apiItem.canonicalReference.isEmpty) {\r\n apiItemsByCanonicalReference.set(apiItem.canonicalReference.toString(), apiItem);\r\n }\r\n\r\n // Recurse container members\r\n if (ApiItemContainerMixin.isBaseClassOf(apiItem)) {\r\n for (const apiMember of apiItem.members) {\r\n this._initApiItemsRecursive(apiMember, apiItemsByCanonicalReference);\r\n }\r\n }\r\n }\r\n\r\n /** @beta @override */\r\n public buildCanonicalReference(): DeclarationReference {\r\n return DeclarationReference.empty();\r\n }\r\n}\r\n"]}
@@ -37,9 +37,9 @@ export declare class ApiNamespace extends ApiNamespace_base {
37
37
  constructor(options: IApiNamespaceOptions);
38
38
  static getContainerKey(name: string): string;
39
39
  /** @override */
40
- readonly kind: ApiItemKind;
40
+ get kind(): ApiItemKind;
41
41
  /** @override */
42
- readonly containerKey: string;
42
+ get containerKey(): string;
43
43
  /** @beta @override */
44
44
  buildCanonicalReference(): DeclarationReference;
45
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ApiNamespace.d.ts","sourceRoot":"","sources":["../../src/model/ApiNamespace.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE5E;;;GAGG;AACH,MAAM,WAAW,oBACf,SAAQ,6BAA6B,EACnC,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB;CAAG;;AAE9B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,YAAa,SAAQ,iBAAwE;gBACrF,OAAO,EAAE,oBAAoB;WAIlC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAInD,gBAAgB;aACL,IAAI,EAAI,WAAW;IAI9B,gBAAgB;aACL,YAAY,EAAI,MAAM;IAIjC,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAMvD"}
1
+ {"version":3,"file":"ApiNamespace.d.ts","sourceRoot":"","sources":["../../src/model/ApiNamespace.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE5E;;;GAGG;AACH,MAAM,WAAW,oBACf,SAAQ,6BAA6B,EACnC,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB;CAAG;;AAE9B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,YAAa,SAAQ,iBAAwE;gBACrF,OAAO,EAAE,oBAAoB;WAIlC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAInD,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAMvD"}
@@ -2,6 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ApiNamespace = void 0;
5
6
  const DeclarationReference_1 = require("@microsoft/tsdoc/lib/beta/DeclarationReference");
6
7
  const ApiItemContainerMixin_1 = require("../mixins/ApiItemContainerMixin");
7
8
  const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
@@ -1 +1 @@
1
- {"version":3,"file":"ApiNamespace.js","sourceRoot":"","sources":["../../src/model/ApiNamespace.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAE3D,yFAKwD;AAExD,2EAAuG;AACvG,8DAAoF;AACpF,qEAA8F;AAC9F,yDAA4E;AAY5E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,YAAa,SAAQ,6CAAqB,CAAC,2BAAY,CAAC,uCAAkB,CAAC,iCAAe,CAAC,CAAC,CAAC;IACxG,YAAmB,OAA6B;QAC9C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,2BAAqB,EAAE,CAAC;IAC5C,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,mCAA6B;IAC/B,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,oBAAqB,aAAa,CAAC;aACpD,WAAW,6BAAmB,CAAC;IACpC,CAAC;CACF;AA1BD,oCA0BC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport {\r\n DeclarationReference,\r\n Meaning,\r\n Navigation,\r\n Component\r\n} from '@microsoft/tsdoc/lib/beta/DeclarationReference';\r\nimport { ApiItemKind } from '../items/ApiItem';\r\nimport { ApiItemContainerMixin, IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\r\nimport { IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';\r\nimport { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\r\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\r\n\r\n/**\r\n * Constructor options for {@link ApiClass}.\r\n * @public\r\n */\r\nexport interface IApiNamespaceOptions\r\n extends IApiItemContainerMixinOptions,\r\n IApiNameMixinOptions,\r\n IApiReleaseTagMixinOptions,\r\n IApiDeclaredItemOptions {}\r\n\r\n/**\r\n * Represents a TypeScript namespace declaration.\r\n *\r\n * @remarks\r\n *\r\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\r\n * API declarations.\r\n *\r\n * `ApiNamespace` represents a TypeScript declaration such `X` or `Y` in this example:\r\n *\r\n * ```ts\r\n * export namespace X {\r\n * export namespace Y {\r\n * export interface IWidget {\r\n * render(): void;\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class ApiNamespace extends ApiItemContainerMixin(ApiNameMixin(ApiReleaseTagMixin(ApiDeclaredItem))) {\r\n public constructor(options: IApiNamespaceOptions) {\r\n super(options);\r\n }\r\n\r\n public static getContainerKey(name: string): string {\r\n return `${name}|${ApiItemKind.Namespace}`;\r\n }\r\n\r\n /** @override */\r\n public get kind(): ApiItemKind {\r\n return ApiItemKind.Namespace;\r\n }\r\n\r\n /** @override */\r\n public get containerKey(): string {\r\n return ApiNamespace.getContainerKey(this.name);\r\n }\r\n\r\n /** @beta @override */\r\n public buildCanonicalReference(): DeclarationReference {\r\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\r\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\r\n .addNavigationStep(Navigation.Exports, nameComponent)\r\n .withMeaning(Meaning.Namespace);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ApiNamespace.js","sourceRoot":"","sources":["../../src/model/ApiNamespace.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,yFAKwD;AAExD,2EAAuG;AACvG,8DAAoF;AACpF,qEAA8F;AAC9F,yDAA4E;AAY5E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,YAAa,SAAQ,6CAAqB,CAAC,2BAAY,CAAC,uCAAkB,CAAC,iCAAe,CAAC,CAAC,CAAC;IACxG,YAAmB,OAA6B;QAC9C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,2BAAqB,EAAE,CAAC;IAC5C,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,mCAA6B;IAC/B,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,oBAAqB,aAAa,CAAC;aACpD,WAAW,6BAAmB,CAAC;IACpC,CAAC;CACF;AA1BD,oCA0BC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport {\r\n DeclarationReference,\r\n Meaning,\r\n Navigation,\r\n Component\r\n} from '@microsoft/tsdoc/lib/beta/DeclarationReference';\r\nimport { ApiItemKind } from '../items/ApiItem';\r\nimport { ApiItemContainerMixin, IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\r\nimport { IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';\r\nimport { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\r\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\r\n\r\n/**\r\n * Constructor options for {@link ApiClass}.\r\n * @public\r\n */\r\nexport interface IApiNamespaceOptions\r\n extends IApiItemContainerMixinOptions,\r\n IApiNameMixinOptions,\r\n IApiReleaseTagMixinOptions,\r\n IApiDeclaredItemOptions {}\r\n\r\n/**\r\n * Represents a TypeScript namespace declaration.\r\n *\r\n * @remarks\r\n *\r\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\r\n * API declarations.\r\n *\r\n * `ApiNamespace` represents a TypeScript declaration such `X` or `Y` in this example:\r\n *\r\n * ```ts\r\n * export namespace X {\r\n * export namespace Y {\r\n * export interface IWidget {\r\n * render(): void;\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class ApiNamespace extends ApiItemContainerMixin(ApiNameMixin(ApiReleaseTagMixin(ApiDeclaredItem))) {\r\n public constructor(options: IApiNamespaceOptions) {\r\n super(options);\r\n }\r\n\r\n public static getContainerKey(name: string): string {\r\n return `${name}|${ApiItemKind.Namespace}`;\r\n }\r\n\r\n /** @override */\r\n public get kind(): ApiItemKind {\r\n return ApiItemKind.Namespace;\r\n }\r\n\r\n /** @override */\r\n public get containerKey(): string {\r\n return ApiNamespace.getContainerKey(this.name);\r\n }\r\n\r\n /** @beta @override */\r\n public buildCanonicalReference(): DeclarationReference {\r\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\r\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\r\n .addNavigationStep(Navigation.Exports, nameComponent)\r\n .withMeaning(Meaning.Namespace);\r\n }\r\n}\r\n"]}
@@ -89,10 +89,10 @@ export declare class ApiPackage extends ApiPackage_base {
89
89
  constructor(options: IApiPackageOptions);
90
90
  static loadFromJsonFile(apiJsonFilename: string): ApiPackage;
91
91
  /** @override */
92
- readonly kind: ApiItemKind;
92
+ get kind(): ApiItemKind;
93
93
  /** @override */
94
- readonly containerKey: string;
95
- readonly entryPoints: ReadonlyArray<ApiEntryPoint>;
94
+ get containerKey(): string;
95
+ get entryPoints(): ReadonlyArray<ApiEntryPoint>;
96
96
  /** @override */
97
97
  addMember(member: ApiEntryPoint): void;
98
98
  findEntryPointsByPath(importPath: string): ReadonlyArray<ApiEntryPoint>;
@@ -1 +1 @@
1
- {"version":3,"file":"ApiPackage.d.ts","sourceRoot":"","sources":["../../src/model/ApiPackage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAW,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,EAEL,oBAAoB,EAGrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAuB,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElF;;;GAGG;AACH,MAAM,WAAW,kBACf,SAAQ,6BAA6B,EACnC,oBAAoB,EACpB,yBAAyB;CAAG;AAEhC,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,aAAa,EAAE,oBAAoB,CAAC;IAEpC;;;;;;;;;;;;;OAaG;IACH,+BAA+B,CAAC,EAAE,oBAAoB,CAAC;CACxD;AAED,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD;;OAEG;IACH,QAAQ,EAAE,uBAAuB,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,oBAAoB;IAClE;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;I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BAAoB,EACpB,yBAAyB;CAAG;AAEhC,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,aAAa,EAAE,oBAAoB,CAAC;IAEpC;;;;;;;;;;;;;OAaG;IACH,+BAA+B,CAAC,EAAE,oBAAoB,CAAC;CACxD;AAED,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD;;OAEG;IACH,QAAQ,EAAE,uBAAuB,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,oBAAoB;IAClE;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;AAED;;;;;;;;;GASG;AACH,qBAAa,UAAW,SAAQ,eAAsD;gBACjE,OAAO,EAAE,kBAAkB;WAIhC,gBAAgB,CAAC,eAAe,EAAE,MAAM,GAAG,UAAU;IA0DnE,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAGhC;IAED,IAAW,WAAW,IAAI,aAAa,CAAC,aAAa,CAAC,CAErD;IAED,gBAAgB;IACT,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAOtC,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,CAAC,aAAa,CAAC;IAIvE,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,IAAI;IAqBtF,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAGvD"}
@@ -2,6 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ApiPackage = void 0;
5
6
  const DeclarationReference_1 = require("@microsoft/tsdoc/lib/beta/DeclarationReference");
6
7
  const ApiItem_1 = require("../items/ApiItem");
7
8
  const ApiItemContainerMixin_1 = require("../mixins/ApiItemContainerMixin");
@@ -1 +1 @@
1
- {"version":3,"file":"ApiPackage.js","sourceRoot":"","sources":["../../src/model/ApiPackage.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAE3D,yFAAsF;AACtF,8CAAsE;AACtE,2EAAuG;AACvG,oEAKsC;AACtC,kEAA0F;AAE1F,yDAA4E;AAC5E,+DAAkF;AAiFlF;;;;;;;;;GASG;AACH,MAAa,UAAW,SAAQ,6CAAqB,CAAC,2BAAY,CAAC,qCAAiB,CAAC,CAAC;IACpF,YAAmB,OAA2B;QAC5C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,gBAAgB,CAAC,eAAuB;QACpD,MAAM,UAAU,GAAoB,4BAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAEnE,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,QAAQ,IAAI,OAAO,UAAU,CAAC,QAAQ,CAAC,aAAa,KAAK,QAAQ,EAAE;YAChG,MAAM,IAAI,KAAK,CACb,iBAAiB,eAAe,GAAG;gBACjC,+FAA+F,CAClG,CAAC;SACH;QAED,MAAM,aAAa,GAAW,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAC;QAEhE,IAAI,aAAa,GAAG,0CAAoB,CAAC,gBAAgB,EAAE;YACzD,MAAM,IAAI,KAAK,CACb,iBAAiB,eAAe,GAAG;gBACjC,gCAAgC,aAAa,GAAG;gBAChD,YAAY,0CAAoB,CAAC,gBAAgB,+CAA+C,CACnG,CAAC;SACH;QAED,IAAI,+BAA+B,GAAW,aAAa,CAAC;QAC5D,IAAI,UAAU,CAAC,QAAQ,CAAC,+BAA+B,EAAE;YACvD,eA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EAAgE,CAAC,CAAC;SACnF;QACD,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;IAEM,qBAAqB,CAAC,UAAkB;QAC7C,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAiC,CAAC;IAC5E,CAAC;IAEM,cAAc,CAAC,eAAuB,EAAE,OAAgC;QAC7E,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QAED,MAAM,WAAW,GAAiB,qCAAiB,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAElF,MAAM,UAAU,GAAoB;YAClC,QAAQ,EAAE;gBACR,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,WAAW,CAAC,IAAI;gBACpD,gGAAgG;gBAChG,iEAAiE;gBACjE,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,IAAI,WAAW,CAAC,OAAO;gBAC1F,aAAa,EAAE,0CAAoB,CAAC,MAAM;gBAC1C,+BAA+B,EAAE,0CAAoB,CAAC,0BAA0B;aACjF;SACiB,CAAC;QACrB,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAC/B,4BAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,OAAO,2CAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;CACF;AAnHD,gCAmHC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { DeclarationReference } from '@microsoft/tsdoc/lib/beta/DeclarationReference';\r\nimport { ApiItem, ApiItemKind, IApiItemJson } from '../items/ApiItem';\r\nimport { ApiItemContainerMixin, IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\r\nimport {\r\n JsonFile,\r\n IJsonFileSaveOptions,\r\n PackageJsonLookup,\r\n IPackageJson\r\n} from '@rushstack/node-core-library';\r\nimport { ApiDocumentedItem, IApiDocumentedItemOptions } from '../items/ApiDocumentedItem';\r\nimport { ApiEntryPoint } from './ApiEntryPoint';\r\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\r\nimport { DeserializerContext, ApiJsonSchemaVersion } from './DeserializerContext';\r\n\r\n/**\r\n * Constructor options for {@link ApiPackage}.\r\n * @public\r\n */\r\nexport interface IApiPackageOptions\r\n extends IApiItemContainerMixinOptions,\r\n IApiNameMixinOptions,\r\n IApiDocumentedItemOptions {}\r\n\r\nexport interface IApiPackageMetadataJson {\r\n /**\r\n * The NPM package name for the tool that wrote the *.api.json file.\r\n * For informational purposes only.\r\n */\r\n toolPackage: string;\r\n\r\n /**\r\n * The NPM package version for the tool that wrote the *.api.json file.\r\n * For informational purposes only.\r\n */\r\n toolVersion: string;\r\n\r\n /**\r\n * The schema version for the .api.json file format. Used for determining whether the file format is\r\n * supported, and for backwards compatibility.\r\n */\r\n schemaVersion: ApiJsonSchemaVersion;\r\n\r\n /**\r\n * To support forwards compatibility, the `oldestForwardsCompatibleVersion` field tracks the oldest schema version\r\n * whose corresponding deserializer could safely load this file.\r\n *\r\n * @remarks\r\n * Normally api-extractor-model should refuse to load a schema version that is newer than the latest version\r\n * that its deserializer understands. However, sometimes a schema change may merely introduce some new fields\r\n * without modifying or removing any existing fields. In this case, an older api-extractor-model library can\r\n * safely deserialize the newer version (by ignoring the extra fields that it doesn't recognize). The newer\r\n * serializer can use this field to communicate that.\r\n *\r\n * If present, the `oldestForwardsCompatibleVersion` must be less than or equal to\r\n * `IApiPackageMetadataJson.schemaVersion`.\r\n */\r\n oldestForwardsCompatibleVersion?: ApiJsonSchemaVersion;\r\n}\r\n\r\nexport interface IApiPackageJson extends IApiItemJson {\r\n /**\r\n * A file header that stores metadata about the tool that wrote the *.api.json file.\r\n */\r\n metadata: IApiPackageMetadataJson;\r\n}\r\n\r\n/**\r\n * Options for {@link ApiPackage.saveToJsonFile}.\r\n * @public\r\n */\r\nexport interface IApiPackageSaveOptions extends IJsonFileSaveOptions {\r\n /**\r\n * Optionally specifies a value for the \"toolPackage\" field in the output .api.json data file;\r\n * otherwise, the value will be \"api-extractor-model\".\r\n */\r\n toolPackage?: string;\r\n\r\n /**\r\n * Optionally specifies a value for the \"toolVersion\" field in the output .api.json data file;\r\n * otherwise, the value will be the current version of the api-extractor-model package.\r\n */\r\n toolVersion?: string;\r\n\r\n /**\r\n * Set to true only when invoking API Extractor's test harness.\r\n *\r\n * @remarks\r\n * When `testMode` is true, the `toolVersion` field in the .api.json file is assigned an empty string\r\n * to prevent spurious diffs in output files tracked for tests.\r\n */\r\n testMode?: boolean;\r\n}\r\n\r\n/**\r\n * Represents an NPM package containing API declarations.\r\n *\r\n * @remarks\r\n *\r\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\r\n * API declarations.\r\n *\r\n * @public\r\n */\r\nexport class ApiPackage extends ApiItemContainerMixin(ApiNameMixin(ApiDocumentedItem)) {\r\n public constructor(options: IApiPackageOptions) {\r\n super(options);\r\n }\r\n\r\n public static loadFromJsonFile(apiJsonFilename: string): ApiPackage {\r\n const jsonObject: IApiPackageJson = JsonFile.load(apiJsonFilename);\r\n\r\n if (!jsonObject || !jsonObject.metadata || typeof jsonObject.metadata.schemaVersion !== 'number') {\r\n throw new Error(\r\n `Error loading ${apiJsonFilename}:` +\r\n `\\nThe file format is not recognized; the \"metadata.schemaVersion\" field is missing or invalid`\r\n );\r\n }\r\n\r\n const schemaVersion: number = jsonObject.metadata.schemaVersion;\r\n\r\n if (schemaVersion < ApiJsonSchemaVersion.OLDEST_SUPPORTED) {\r\n throw new Error(\r\n `Error loading ${apiJsonFilename}:` +\r\n `\\nThe file format is version ${schemaVersion},` +\r\n ` whereas ${ApiJsonSchemaVersion.OLDEST_SUPPORTED} is the oldest version supported by this tool`\r\n );\r\n }\r\n\r\n let oldestForwardsCompatibleVersion: number = schemaVersion;\r\n if (jsonObject.metadata.oldestForwardsCompatibleVersion) {\r\n // Sanity check\r\n if (jsonObject.metadata.oldestForwardsCompatibleVersion > schemaVersion) {\r\n throw new Error(\r\n `Error loading ${apiJsonFilename}:` +\r\n `\\nInvalid file format; \"oldestForwardsCompatibleVersion\" cannot be newer than \"schemaVersion\"`\r\n );\r\n }\r\n oldestForwardsCompatibleVersion = jsonObject.metadata.oldestForwardsCompatibleVersion;\r\n }\r\n\r\n let versionToDeserialize: number = schemaVersion;\r\n if (versionToDeserialize > ApiJsonSchemaVersion.LATEST) {\r\n // If the file format is too new, can we treat it as some earlier compatible version\r\n // as indicated by oldestForwardsCompatibleVersion?\r\n versionToDeserialize = Math.max(oldestForwardsCompatibleVersion, ApiJsonSchemaVersion.LATEST);\r\n\r\n if (versionToDeserialize > ApiJsonSchemaVersion.LATEST) {\r\n // Nope, still too new\r\n throw new Error(\r\n `Error loading ${apiJsonFilename}:` +\r\n `\\nThe file format version ${schemaVersion} was written by a newer release of` +\r\n ` the api-extractor-model library; you may need to upgrade your software`\r\n );\r\n }\r\n }\r\n\r\n const context: DeserializerContext = new DeserializerContext({\r\n apiJsonFilename,\r\n toolPackage: jsonObject.metadata.toolPackage,\r\n toolVersion: jsonObject.metadata.toolVersion,\r\n versionToDeserialize: versionToDeserialize\r\n });\r\n\r\n return ApiItem.deserialize(jsonObject, context) as ApiPackage;\r\n }\r\n\r\n /** @override */\r\n public get kind(): ApiItemKind {\r\n return ApiItemKind.Package;\r\n }\r\n\r\n /** @override */\r\n public get containerKey(): string {\r\n // No prefix needed, because ApiPackage is the only possible member of an ApiModel\r\n return this.name;\r\n }\r\n\r\n public get entryPoints(): ReadonlyArray<ApiEntryPoint> {\r\n return this.members as ReadonlyArray<ApiEntryPoint>;\r\n }\r\n\r\n /** @override */\r\n public addMember(member: ApiEntryPoint): void {\r\n if (member.kind !== ApiItemKind.EntryPoint) {\r\n throw new Error('Only items of type ApiEntryPoint may be added to an ApiPackage');\r\n }\r\n super.addMember(member);\r\n }\r\n\r\n public findEntryPointsByPath(importPath: string): ReadonlyArray<ApiEntryPoint> {\r\n return this.findMembersByName(importPath) as ReadonlyArray<ApiEntryPoint>;\r\n }\r\n\r\n public saveToJsonFile(apiJsonFilename: string, options?: IApiPackageSaveOptions): void {\r\n if (!options) {\r\n options = {};\r\n }\r\n\r\n const packageJson: IPackageJson = PackageJsonLookup.loadOwnPackageJson(__dirname);\r\n\r\n const jsonObject: IApiPackageJson = {\r\n metadata: {\r\n toolPackage: options.toolPackage || packageJson.name,\r\n // In test mode, we don't write the real version, since that would cause spurious diffs whenever\r\n // the version is bumped. Instead we write a placeholder string.\r\n toolVersion: options.testMode ? '[test mode]' : options.toolVersion || packageJson.version,\r\n schemaVersion: ApiJsonSchemaVersion.LATEST,\r\n oldestForwardsCompatibleVersion: ApiJsonSchemaVersion.OLDEST_FORWARDS_COMPATIBLE\r\n }\r\n } as IApiPackageJson;\r\n this.serializeInto(jsonObject);\r\n JsonFile.save(jsonObject, apiJsonFilename, options);\r\n }\r\n\r\n /** @beta @override */\r\n public buildCanonicalReference(): DeclarationReference {\r\n return DeclarationReference.package(this.name);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ApiPackage.js","sourceRoot":"","sources":["../../src/model/ApiPackage.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,yFAAsF;AACtF,8CAAsE;AACtE,2EAAuG;AACvG,oEAKsC;AACtC,kEAA0F;AAE1F,yDAA4E;AAC5E,+DAAkF;AAiFlF;;;;;;;;;GASG;AACH,MAAa,UAAW,SAAQ,6CAAqB,CAAC,2BAAY,CAAC,qCAAiB,CAAC,CAAC;IACpF,YAAmB,OAA2B;QAC5C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,gBAAgB,CAAC,eAAuB;QACpD,MAAM,UAAU,GAAoB,4BAA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0CAAoB,CAAC,MAAM;gBAC1C,+BAA+B,EAAE,0CAAoB,CAAC,0BAA0B;aACjF;SACiB,CAAC;QACrB,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAC/B,4BAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,OAAO,2CAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;CACF;AAnHD,gCAmHC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { DeclarationReference } from '@microsoft/tsdoc/lib/beta/DeclarationReference';\r\nimport { ApiItem, ApiItemKind, IApiItemJson } from '../items/ApiItem';\r\nimport { ApiItemContainerMixin, IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\r\nimport {\r\n JsonFile,\r\n IJsonFileSaveOptions,\r\n PackageJsonLookup,\r\n IPackageJson\r\n} from '@rushstack/node-core-library';\r\nimport { ApiDocumentedItem, IApiDocumentedItemOptions } from '../items/ApiDocumentedItem';\r\nimport { ApiEntryPoint } from './ApiEntryPoint';\r\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\r\nimport { DeserializerContext, ApiJsonSchemaVersion } from './DeserializerContext';\r\n\r\n/**\r\n * Constructor options for {@link ApiPackage}.\r\n * @public\r\n */\r\nexport interface IApiPackageOptions\r\n extends IApiItemContainerMixinOptions,\r\n IApiNameMixinOptions,\r\n IApiDocumentedItemOptions {}\r\n\r\nexport interface IApiPackageMetadataJson {\r\n /**\r\n * The NPM package name for the tool that wrote the *.api.json file.\r\n * For informational purposes only.\r\n */\r\n toolPackage: string;\r\n\r\n /**\r\n * The NPM package version for the tool that wrote the *.api.json file.\r\n * For informational purposes only.\r\n */\r\n toolVersion: string;\r\n\r\n /**\r\n * The schema version for the .api.json file format. Used for determining whether the file format is\r\n * supported, and for backwards compatibility.\r\n */\r\n schemaVersion: ApiJsonSchemaVersion;\r\n\r\n /**\r\n * To support forwards compatibility, the `oldestForwardsCompatibleVersion` field tracks the oldest schema version\r\n * whose corresponding deserializer could safely load this file.\r\n *\r\n * @remarks\r\n * Normally api-extractor-model should refuse to load a schema version that is newer than the latest version\r\n * that its deserializer understands. However, sometimes a schema change may merely introduce some new fields\r\n * without modifying or removing any existing fields. In this case, an older api-extractor-model library can\r\n * safely deserialize the newer version (by ignoring the extra fields that it doesn't recognize). The newer\r\n * serializer can use this field to communicate that.\r\n *\r\n * If present, the `oldestForwardsCompatibleVersion` must be less than or equal to\r\n * `IApiPackageMetadataJson.schemaVersion`.\r\n */\r\n oldestForwardsCompatibleVersion?: ApiJsonSchemaVersion;\r\n}\r\n\r\nexport interface IApiPackageJson extends IApiItemJson {\r\n /**\r\n * A file header that stores metadata about the tool that wrote the *.api.json file.\r\n */\r\n metadata: IApiPackageMetadataJson;\r\n}\r\n\r\n/**\r\n * Options for {@link ApiPackage.saveToJsonFile}.\r\n * @public\r\n */\r\nexport interface IApiPackageSaveOptions extends IJsonFileSaveOptions {\r\n /**\r\n * Optionally specifies a value for the \"toolPackage\" field in the output .api.json data file;\r\n * otherwise, the value will be \"api-extractor-model\".\r\n */\r\n toolPackage?: string;\r\n\r\n /**\r\n * Optionally specifies a value for the \"toolVersion\" field in the output .api.json data file;\r\n * otherwise, the value will be the current version of the api-extractor-model package.\r\n */\r\n toolVersion?: string;\r\n\r\n /**\r\n * Set to true only when invoking API Extractor's test harness.\r\n *\r\n * @remarks\r\n * When `testMode` is true, the `toolVersion` field in the .api.json file is assigned an empty string\r\n * to prevent spurious diffs in output files tracked for tests.\r\n */\r\n testMode?: boolean;\r\n}\r\n\r\n/**\r\n * Represents an NPM package containing API declarations.\r\n *\r\n * @remarks\r\n *\r\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\r\n * API declarations.\r\n *\r\n * @public\r\n */\r\nexport class ApiPackage extends ApiItemContainerMixin(ApiNameMixin(ApiDocumentedItem)) {\r\n public constructor(options: IApiPackageOptions) {\r\n super(options);\r\n }\r\n\r\n public static loadFromJsonFile(apiJsonFilename: string): ApiPackage {\r\n const jsonObject: IApiPackageJson = JsonFile.load(apiJsonFilename);\r\n\r\n if (!jsonObject || !jsonObject.metadata || typeof jsonObject.metadata.schemaVersion !== 'number') {\r\n throw new Error(\r\n `Error loading ${apiJsonFilename}:` +\r\n `\\nThe file format is not recognized; the \"metadata.schemaVersion\" field is missing or invalid`\r\n );\r\n }\r\n\r\n const schemaVersion: number = jsonObject.metadata.schemaVersion;\r\n\r\n if (schemaVersion < ApiJsonSchemaVersion.OLDEST_SUPPORTED) {\r\n throw new Error(\r\n `Error loading ${apiJsonFilename}:` +\r\n `\\nThe file format is version ${schemaVersion},` +\r\n ` whereas ${ApiJsonSchemaVersion.OLDEST_SUPPORTED} is the oldest version supported by this tool`\r\n );\r\n }\r\n\r\n let oldestForwardsCompatibleVersion: number = schemaVersion;\r\n if (jsonObject.metadata.oldestForwardsCompatibleVersion) {\r\n // Sanity check\r\n if (jsonObject.metadata.oldestForwardsCompatibleVersion > schemaVersion) {\r\n throw new Error(\r\n `Error loading ${apiJsonFilename}:` +\r\n `\\nInvalid file format; \"oldestForwardsCompatibleVersion\" cannot be newer than \"schemaVersion\"`\r\n );\r\n }\r\n oldestForwardsCompatibleVersion = jsonObject.metadata.oldestForwardsCompatibleVersion;\r\n }\r\n\r\n let versionToDeserialize: number = schemaVersion;\r\n if (versionToDeserialize > ApiJsonSchemaVersion.LATEST) {\r\n // If the file format is too new, can we treat it as some earlier compatible version\r\n // as indicated by oldestForwardsCompatibleVersion?\r\n versionToDeserialize = Math.max(oldestForwardsCompatibleVersion, ApiJsonSchemaVersion.LATEST);\r\n\r\n if (versionToDeserialize > ApiJsonSchemaVersion.LATEST) {\r\n // Nope, still too new\r\n throw new Error(\r\n `Error loading ${apiJsonFilename}:` +\r\n `\\nThe file format version ${schemaVersion} was written by a newer release of` +\r\n ` the api-extractor-model library; you may need to upgrade your software`\r\n );\r\n }\r\n }\r\n\r\n const context: DeserializerContext = new DeserializerContext({\r\n apiJsonFilename,\r\n toolPackage: jsonObject.metadata.toolPackage,\r\n toolVersion: jsonObject.metadata.toolVersion,\r\n versionToDeserialize: versionToDeserialize\r\n });\r\n\r\n return ApiItem.deserialize(jsonObject, context) as ApiPackage;\r\n }\r\n\r\n /** @override */\r\n public get kind(): ApiItemKind {\r\n return ApiItemKind.Package;\r\n }\r\n\r\n /** @override */\r\n public get containerKey(): string {\r\n // No prefix needed, because ApiPackage is the only possible member of an ApiModel\r\n return this.name;\r\n }\r\n\r\n public get entryPoints(): ReadonlyArray<ApiEntryPoint> {\r\n return this.members as ReadonlyArray<ApiEntryPoint>;\r\n }\r\n\r\n /** @override */\r\n public addMember(member: ApiEntryPoint): void {\r\n if (member.kind !== ApiItemKind.EntryPoint) {\r\n throw new Error('Only items of type ApiEntryPoint may be added to an ApiPackage');\r\n }\r\n super.addMember(member);\r\n }\r\n\r\n public findEntryPointsByPath(importPath: string): ReadonlyArray<ApiEntryPoint> {\r\n return this.findMembersByName(importPath) as ReadonlyArray<ApiEntryPoint>;\r\n }\r\n\r\n public saveToJsonFile(apiJsonFilename: string, options?: IApiPackageSaveOptions): void {\r\n if (!options) {\r\n options = {};\r\n }\r\n\r\n const packageJson: IPackageJson = PackageJsonLookup.loadOwnPackageJson(__dirname);\r\n\r\n const jsonObject: IApiPackageJson = {\r\n metadata: {\r\n toolPackage: options.toolPackage || packageJson.name,\r\n // In test mode, we don't write the real version, since that would cause spurious diffs whenever\r\n // the version is bumped. Instead we write a placeholder string.\r\n toolVersion: options.testMode ? '[test mode]' : options.toolVersion || packageJson.version,\r\n schemaVersion: ApiJsonSchemaVersion.LATEST,\r\n oldestForwardsCompatibleVersion: ApiJsonSchemaVersion.OLDEST_FORWARDS_COMPATIBLE\r\n }\r\n } as IApiPackageJson;\r\n this.serializeInto(jsonObject);\r\n JsonFile.save(jsonObject, apiJsonFilename, options);\r\n }\r\n\r\n /** @beta @override */\r\n public buildCanonicalReference(): DeclarationReference {\r\n return DeclarationReference.package(this.name);\r\n }\r\n}\r\n"]}
@@ -47,9 +47,9 @@ export declare class ApiProperty extends ApiProperty_base {
47
47
  constructor(options: IApiPropertyOptions);
48
48
  static getContainerKey(name: string, isStatic: boolean): string;
49
49
  /** @override */
50
- readonly kind: ApiItemKind;
50
+ get kind(): ApiItemKind;
51
51
  /** @override */
52
- readonly containerKey: string;
52
+ get containerKey(): string;
53
53
  /** @beta @override */
54
54
  buildCanonicalReference(): DeclarationReference;
55
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ApiProperty.d.ts","sourceRoot":"","sources":["../../src/model/ApiProperty.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEpF;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,uBAAuB,EAAE,sBAAsB;CAAG;;AAE/F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,WAAY,SAAQ,gBAA+B;gBAC3C,OAAO,EAAE,mBAAmB;WAIjC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM;IAQtE,gBAAgB;aACL,IAAI,EAAI,WAAW;IAI9B,gBAAgB;aACL,YAAY,EAAI,MAAM;IAIjC,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAMvD"}
1
+ {"version":3,"file":"ApiProperty.d.ts","sourceRoot":"","sources":["../../src/model/ApiProperty.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEpF;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,uBAAuB,EAAE,sBAAsB;CAAG;;AAE/F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,WAAY,SAAQ,gBAA+B;gBAC3C,OAAO,EAAE,mBAAmB;WAIjC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM;IAQtE,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAMvD"}
@@ -2,6 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ApiProperty = void 0;
5
6
  const DeclarationReference_1 = require("@microsoft/tsdoc/lib/beta/DeclarationReference");
6
7
  const ApiStaticMixin_1 = require("../mixins/ApiStaticMixin");
7
8
  const ApiPropertyItem_1 = require("../items/ApiPropertyItem");
@@ -1 +1 @@
1
- {"version":3,"file":"ApiProperty.js","sourceRoot":"","sources":["../../src/model/ApiProperty.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAE3D,yFAKwD;AAExD,6DAAkF;AAClF,8DAAoF;AAQpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAa,WAAY,SAAQ,+BAAc,CAAC,iCAAe,CAAC;IAC9D,YAAmB,OAA4B;QAC7C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY,EAAE,QAAiB;QAC3D,IAAI,QAAQ,EAAE;YACZ,OAAO,GAAG,IAAI,IAAI,yBAAoB,SAAS,CAAC;SACjD;aAAM;YACL,OAAO,GAAG,IAAI,IAAI,yBAAoB,WAAW,CAAC;SACnD;IACH,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,iCAA4B;IAC9B,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/D,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,mBAAoB,CAAC,kBAAmB,EAAE,aAAa,CAAC;aACzF,WAAW,uBAAgB,CAAC;IACjC,CAAC;CACF;AA9BD,kCA8BC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport {\r\n DeclarationReference,\r\n Meaning,\r\n Navigation,\r\n Component\r\n} from '@microsoft/tsdoc/lib/beta/DeclarationReference';\r\nimport { ApiItemKind } from '../items/ApiItem';\r\nimport { ApiStaticMixin, IApiStaticMixinOptions } from '../mixins/ApiStaticMixin';\r\nimport { ApiPropertyItem, IApiPropertyItemOptions } from '../items/ApiPropertyItem';\r\n\r\n/**\r\n * Constructor options for {@link ApiProperty}.\r\n * @public\r\n */\r\nexport interface IApiPropertyOptions extends IApiPropertyItemOptions, IApiStaticMixinOptions {}\r\n\r\n/**\r\n * Represents a TypeScript property declaration that belongs to an `ApiClass`.\r\n *\r\n * @remarks\r\n *\r\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\r\n * API declarations.\r\n *\r\n * `ApiProperty` represents a TypeScript declaration such as the `width` and `height` members in this example:\r\n *\r\n * ```ts\r\n * export class Widget {\r\n * public width: number = 100;\r\n *\r\n * public get height(): number {\r\n * if (this.isSquashed()) {\r\n * return 0;\r\n * } else {\r\n * return this.clientArea.height;\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * Note that member variables are also considered to be properties.\r\n *\r\n * If the property has both a getter function and setter function, they will be represented by a single `ApiProperty`\r\n * and must have a single documentation comment.\r\n *\r\n * Compare with {@link ApiPropertySignature}, which represents a property belonging to an interface.\r\n * For example, a class property can be `static` but an interface property cannot.\r\n *\r\n * @public\r\n */\r\nexport class ApiProperty extends ApiStaticMixin(ApiPropertyItem) {\r\n public constructor(options: IApiPropertyOptions) {\r\n super(options);\r\n }\r\n\r\n public static getContainerKey(name: string, isStatic: boolean): string {\r\n if (isStatic) {\r\n return `${name}|${ApiItemKind.Property}|static`;\r\n } else {\r\n return `${name}|${ApiItemKind.Property}|instance`;\r\n }\r\n }\r\n\r\n /** @override */\r\n public get kind(): ApiItemKind {\r\n return ApiItemKind.Property;\r\n }\r\n\r\n /** @override */\r\n public get containerKey(): string {\r\n return ApiProperty.getContainerKey(this.name, this.isStatic);\r\n }\r\n\r\n /** @beta @override */\r\n public buildCanonicalReference(): DeclarationReference {\r\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\r\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\r\n .addNavigationStep(this.isStatic ? Navigation.Exports : Navigation.Members, nameComponent)\r\n .withMeaning(Meaning.Member);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ApiProperty.js","sourceRoot":"","sources":["../../src/model/ApiProperty.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,yFAKwD;AAExD,6DAAkF;AAClF,8DAAoF;AAQpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAa,WAAY,SAAQ,+BAAc,CAAC,iCAAe,CAAC;IAC9D,YAAmB,OAA4B;QAC7C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY,EAAE,QAAiB;QAC3D,IAAI,QAAQ,EAAE;YACZ,OAAO,GAAG,IAAI,IAAI,yBAAoB,SAAS,CAAC;SACjD;aAAM;YACL,OAAO,GAAG,IAAI,IAAI,yBAAoB,WAAW,CAAC;SACnD;IACH,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,iCAA4B;IAC9B,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/D,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,mBAAoB,CAAC,kBAAmB,EAAE,aAAa,CAAC;aACzF,WAAW,uBAAgB,CAAC;IACjC,CAAC;CACF;AA9BD,kCA8BC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport {\r\n DeclarationReference,\r\n Meaning,\r\n Navigation,\r\n Component\r\n} from '@microsoft/tsdoc/lib/beta/DeclarationReference';\r\nimport { ApiItemKind } from '../items/ApiItem';\r\nimport { ApiStaticMixin, IApiStaticMixinOptions } from '../mixins/ApiStaticMixin';\r\nimport { ApiPropertyItem, IApiPropertyItemOptions } from '../items/ApiPropertyItem';\r\n\r\n/**\r\n * Constructor options for {@link ApiProperty}.\r\n * @public\r\n */\r\nexport interface IApiPropertyOptions extends IApiPropertyItemOptions, IApiStaticMixinOptions {}\r\n\r\n/**\r\n * Represents a TypeScript property declaration that belongs to an `ApiClass`.\r\n *\r\n * @remarks\r\n *\r\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\r\n * API declarations.\r\n *\r\n * `ApiProperty` represents a TypeScript declaration such as the `width` and `height` members in this example:\r\n *\r\n * ```ts\r\n * export class Widget {\r\n * public width: number = 100;\r\n *\r\n * public get height(): number {\r\n * if (this.isSquashed()) {\r\n * return 0;\r\n * } else {\r\n * return this.clientArea.height;\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * Note that member variables are also considered to be properties.\r\n *\r\n * If the property has both a getter function and setter function, they will be represented by a single `ApiProperty`\r\n * and must have a single documentation comment.\r\n *\r\n * Compare with {@link ApiPropertySignature}, which represents a property belonging to an interface.\r\n * For example, a class property can be `static` but an interface property cannot.\r\n *\r\n * @public\r\n */\r\nexport class ApiProperty extends ApiStaticMixin(ApiPropertyItem) {\r\n public constructor(options: IApiPropertyOptions) {\r\n super(options);\r\n }\r\n\r\n public static getContainerKey(name: string, isStatic: boolean): string {\r\n if (isStatic) {\r\n return `${name}|${ApiItemKind.Property}|static`;\r\n } else {\r\n return `${name}|${ApiItemKind.Property}|instance`;\r\n }\r\n }\r\n\r\n /** @override */\r\n public get kind(): ApiItemKind {\r\n return ApiItemKind.Property;\r\n }\r\n\r\n /** @override */\r\n public get containerKey(): string {\r\n return ApiProperty.getContainerKey(this.name, this.isStatic);\r\n }\r\n\r\n /** @beta @override */\r\n public buildCanonicalReference(): DeclarationReference {\r\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\r\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\r\n .addNavigationStep(this.isStatic ? Navigation.Exports : Navigation.Members, nameComponent)\r\n .withMeaning(Meaning.Member);\r\n }\r\n}\r\n"]}
@@ -33,9 +33,9 @@ export declare class ApiPropertySignature extends ApiPropertyItem {
33
33
  constructor(options: IApiPropertySignatureOptions);
34
34
  static getContainerKey(name: string): string;
35
35
  /** @override */
36
- readonly kind: ApiItemKind;
36
+ get kind(): ApiItemKind;
37
37
  /** @override */
38
- readonly containerKey: string;
38
+ get containerKey(): string;
39
39
  /** @beta @override */
40
40
  buildCanonicalReference(): DeclarationReference;
41
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ApiPropertySignature.d.ts","sourceRoot":"","sources":["../../src/model/ApiPropertySignature.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEpF;;;GAGG;AACH,MAAM,WAAW,4BAA6B,SAAQ,uBAAuB;CAAG;AAEhF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,oBAAqB,SAAQ,eAAe;gBACpC,OAAO,EAAE,4BAA4B;WAI1C,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAInD,gBAAgB;aACL,IAAI,EAAI,WAAW;IAI9B,gBAAgB;aACL,YAAY,EAAI,MAAM;IAIjC,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAMvD"}
1
+ {"version":3,"file":"ApiPropertySignature.d.ts","sourceRoot":"","sources":["../../src/model/ApiPropertySignature.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEpF;;;GAGG;AACH,MAAM,WAAW,4BAA6B,SAAQ,uBAAuB;CAAG;AAEhF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,oBAAqB,SAAQ,eAAe;gBACpC,OAAO,EAAE,4BAA4B;WAI1C,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAInD,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAMvD"}
@@ -2,6 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ApiPropertySignature = void 0;
5
6
  const DeclarationReference_1 = require("@microsoft/tsdoc/lib/beta/DeclarationReference");
6
7
  const ApiPropertyItem_1 = require("../items/ApiPropertyItem");
7
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ApiPropertySignature.js","sourceRoot":"","sources":["../../src/model/ApiPropertySignature.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAE3D,yFAKwD;AAExD,8DAAoF;AAQpF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,oBAAqB,SAAQ,iCAAe;IACvD,YAAmB,OAAqC;QACtD,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,2CAA6B,EAAE,CAAC;IACpD,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,mDAAqC;IACvC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,oBAAoB,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,oBAAqB,aAAa,CAAC;aACpD,WAAW,uBAAgB,CAAC;IACjC,CAAC;CACF;AA1BD,oDA0BC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport {\r\n DeclarationReference,\r\n Meaning,\r\n Navigation,\r\n Component\r\n} from '@microsoft/tsdoc/lib/beta/DeclarationReference';\r\nimport { ApiItemKind } from '../items/ApiItem';\r\nimport { ApiPropertyItem, IApiPropertyItemOptions } from '../items/ApiPropertyItem';\r\n\r\n/**\r\n * Constructor options for {@link ApiPropertySignature}.\r\n * @public\r\n */\r\nexport interface IApiPropertySignatureOptions extends IApiPropertyItemOptions {}\r\n\r\n/**\r\n * Represents a TypeScript property declaration that belongs to an `ApiInterface`.\r\n *\r\n * @remarks\r\n *\r\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\r\n * API declarations.\r\n *\r\n * `ApiPropertySignature` represents a TypeScript declaration such as the `width` and `height` members in this example:\r\n *\r\n * ```ts\r\n * export interface IWidget {\r\n * readonly width: number;\r\n * height: number;\r\n * }\r\n * ```\r\n *\r\n * Compare with {@link ApiProperty}, which represents a property belonging to a class.\r\n * For example, a class property can be `static` but an interface property cannot.\r\n *\r\n * @public\r\n */\r\nexport class ApiPropertySignature extends ApiPropertyItem {\r\n public constructor(options: IApiPropertySignatureOptions) {\r\n super(options);\r\n }\r\n\r\n public static getContainerKey(name: string): string {\r\n return `${name}|${ApiItemKind.PropertySignature}`;\r\n }\r\n\r\n /** @override */\r\n public get kind(): ApiItemKind {\r\n return ApiItemKind.PropertySignature;\r\n }\r\n\r\n /** @override */\r\n public get containerKey(): string {\r\n return ApiPropertySignature.getContainerKey(this.name);\r\n }\r\n\r\n /** @beta @override */\r\n public buildCanonicalReference(): DeclarationReference {\r\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\r\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\r\n .addNavigationStep(Navigation.Members, nameComponent)\r\n .withMeaning(Meaning.Member);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ApiPropertySignature.js","sourceRoot":"","sources":["../../src/model/ApiPropertySignature.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,yFAKwD;AAExD,8DAAoF;AAQpF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,oBAAqB,SAAQ,iCAAe;IACvD,YAAmB,OAAqC;QACtD,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,2CAA6B,EAAE,CAAC;IACpD,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,mDAAqC;IACvC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,oBAAoB,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,oBAAqB,aAAa,CAAC;aACpD,WAAW,uBAAgB,CAAC;IACjC,CAAC;CACF;AA1BD,oDA0BC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport {\r\n DeclarationReference,\r\n Meaning,\r\n Navigation,\r\n Component\r\n} from '@microsoft/tsdoc/lib/beta/DeclarationReference';\r\nimport { ApiItemKind } from '../items/ApiItem';\r\nimport { ApiPropertyItem, IApiPropertyItemOptions } from '../items/ApiPropertyItem';\r\n\r\n/**\r\n * Constructor options for {@link ApiPropertySignature}.\r\n * @public\r\n */\r\nexport interface IApiPropertySignatureOptions extends IApiPropertyItemOptions {}\r\n\r\n/**\r\n * Represents a TypeScript property declaration that belongs to an `ApiInterface`.\r\n *\r\n * @remarks\r\n *\r\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\r\n * API declarations.\r\n *\r\n * `ApiPropertySignature` represents a TypeScript declaration such as the `width` and `height` members in this example:\r\n *\r\n * ```ts\r\n * export interface IWidget {\r\n * readonly width: number;\r\n * height: number;\r\n * }\r\n * ```\r\n *\r\n * Compare with {@link ApiProperty}, which represents a property belonging to a class.\r\n * For example, a class property can be `static` but an interface property cannot.\r\n *\r\n * @public\r\n */\r\nexport class ApiPropertySignature extends ApiPropertyItem {\r\n public constructor(options: IApiPropertySignatureOptions) {\r\n super(options);\r\n }\r\n\r\n public static getContainerKey(name: string): string {\r\n return `${name}|${ApiItemKind.PropertySignature}`;\r\n }\r\n\r\n /** @override */\r\n public get kind(): ApiItemKind {\r\n return ApiItemKind.PropertySignature;\r\n }\r\n\r\n /** @override */\r\n public get containerKey(): string {\r\n return ApiPropertySignature.getContainerKey(this.name);\r\n }\r\n\r\n /** @beta @override */\r\n public buildCanonicalReference(): DeclarationReference {\r\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\r\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\r\n .addNavigationStep(Navigation.Members, nameComponent)\r\n .withMeaning(Meaning.Member);\r\n }\r\n}\r\n"]}
@@ -61,9 +61,9 @@ export declare class ApiTypeAlias extends ApiTypeAlias_base {
61
61
  static onDeserializeInto(options: Partial<IApiTypeAliasOptions>, context: DeserializerContext, jsonObject: IApiTypeAliasJson): void;
62
62
  static getContainerKey(name: string): string;
63
63
  /** @override */
64
- readonly kind: ApiItemKind;
64
+ get kind(): ApiItemKind;
65
65
  /** @override */
66
- readonly containerKey: string;
66
+ get containerKey(): string;
67
67
  /** @override */
68
68
  serializeInto(jsonObject: Partial<IApiTypeAliasJson>): void;
69
69
  /** @beta @override */
@@ -1 +1 @@
1
- {"version":3,"file":"ApiTypeAlias.d.ts","sourceRoot":"","sources":["../../src/model/ApiTypeAlias.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC1G,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EACL,yBAAyB,EACzB,iCAAiC,EACjC,8BAA8B,EAC/B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH,MAAM,WAAW,oBACf,SAAQ,oBAAoB,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,iCAAiC;IACnC,cAAc,EAAE,kBAAkB,CAAC;CACpC;AAED,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB,EAAE,8BAA8B;IAC7F,cAAc,EAAE,kBAAkB,CAAC;CACpC;;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,YAAa,SAAQ,iBAEjC;IACC;;;;;;;;;;OAUG;IACH,SAA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AQ,oBAAoB,EAAE,8BAA8B;IAC7F,cAAc,EAAE,kBAAkB,CAAC;CACpC;;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,YAAa,SAAQ,iBAEjC;IACC;;;;;;;;;;OAUG;IACH,SAAgB,WAAW,EAAE,OAAO,CAAC;gBAElB,OAAO,EAAE,oBAAoB;IAMhD,gBAAgB;WACF,iBAAiB,CAC7B,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EACtC,OAAO,EAAE,mBAAmB,EAC5B,UAAU,EAAE,iBAAiB,GAC5B,IAAI;WAMO,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAInD,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,gBAAgB;IACT,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAMlE,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAMvD"}
@@ -2,6 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ApiTypeAlias = void 0;
5
6
  const DeclarationReference_1 = require("@microsoft/tsdoc/lib/beta/DeclarationReference");
6
7
  const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
7
8
  const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
@@ -1 +1 @@
1
- {"version":3,"file":"ApiTypeAlias.js","sourceRoot":"","sources":["../../src/model/ApiTypeAlias.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAE3D,yFAKwD;AAGxD,8DAA0G;AAC1G,qEAA8F;AAC9F,yDAA4E;AAC5E,mFAI6C;AAmB7C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAa,YAAa,S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":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport {\r\n DeclarationReference,\r\n Meaning,\r\n Navigation,\r\n Component\r\n} from '@microsoft/tsdoc/lib/beta/DeclarationReference';\r\nimport { Excerpt, IExcerptTokenRange } from '../mixins/Excerpt';\r\nimport { ApiItemKind } from '../items/ApiItem';\r\nimport { ApiDeclaredItem, IApiDeclaredItemOptions, IApiDeclaredItemJson } from '../items/ApiDeclaredItem';\r\nimport { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\r\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\r\nimport {\r\n ApiTypeParameterListMixin,\r\n IApiTypeParameterListMixinOptions,\r\n IApiTypeParameterListMixinJson\r\n} from '../mixins/ApiTypeParameterListMixin';\r\nimport { DeserializerContext } from './DeserializerContext';\r\n\r\n/**\r\n * Constructor options for {@link ApiTypeAlias}.\r\n * @public\r\n */\r\nexport interface IApiTypeAliasOptions\r\n extends IApiNameMixinOptions,\r\n IApiReleaseTagMixinOptions,\r\n IApiDeclaredItemOptions,\r\n IApiTypeParameterListMixinOptions {\r\n typeTokenRange: IExcerptTokenRange;\r\n}\r\n\r\nexport interface IApiTypeAliasJson extends IApiDeclaredItemJson, IApiTypeParameterListMixinJson {\r\n typeTokenRange: IExcerptTokenRange;\r\n}\r\n\r\n/**\r\n * Represents a TypeScript type alias declaration.\r\n *\r\n * @remarks\r\n *\r\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\r\n * API declarations.\r\n *\r\n * `ApiTypeAlias` represents a definition such as one of these examples:\r\n *\r\n * ```ts\r\n * // A union type:\r\n * export type Shape = Square | Triangle | Circle;\r\n *\r\n * // A generic type alias:\r\n * export type BoxedValue<T> = { value: T };\r\n *\r\n * export type BoxedArray<T> = { array: T[] };\r\n *\r\n * // A conditional type alias:\r\n * export type Boxed<T> = T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;\r\n *\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class ApiTypeAlias extends ApiTypeParameterListMixin(\r\n ApiNameMixin(ApiReleaseTagMixin(ApiDeclaredItem))\r\n) {\r\n /**\r\n * An {@link Excerpt} that describes the type of the alias.\r\n *\r\n * @remarks\r\n * In the example below, the `typeExcerpt` would correspond to the subexpression\r\n * `T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;`:\r\n *\r\n * ```ts\r\n * export type Boxed<T> = T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;\r\n * ```\r\n */\r\n public readonly typeExcerpt: Excerpt;\r\n\r\n public constructor(options: IApiTypeAliasOptions) {\r\n super(options);\r\n\r\n this.typeExcerpt = this.buildExcerpt(options.typeTokenRange);\r\n }\r\n\r\n /** @override */\r\n public static onDeserializeInto(\r\n options: Partial<IApiTypeAliasOptions>,\r\n context: DeserializerContext,\r\n jsonObject: IApiTypeAliasJson\r\n ): void {\r\n super.onDeserializeInto(options, context, jsonObject);\r\n\r\n options.typeTokenRange = jsonObject.typeTokenRange;\r\n }\r\n\r\n public static getContainerKey(name: string): string {\r\n return `${name}|${ApiItemKind.TypeAlias}`;\r\n }\r\n\r\n /** @override */\r\n public get kind(): ApiItemKind {\r\n return ApiItemKind.TypeAlias;\r\n }\r\n\r\n /** @override */\r\n public get containerKey(): string {\r\n return ApiTypeAlias.getContainerKey(this.name);\r\n }\r\n\r\n /** @override */\r\n public serializeInto(jsonObject: Partial<IApiTypeAliasJson>): void {\r\n super.serializeInto(jsonObject);\r\n\r\n jsonObject.typeTokenRange = this.typeExcerpt.tokenRange;\r\n }\r\n\r\n /** @beta @override */\r\n public buildCanonicalReference(): DeclarationReference {\r\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\r\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\r\n .addNavigationStep(Navigation.Exports, nameComponent)\r\n .withMeaning(Meaning.TypeAlias);\r\n }\r\n}\r\n"]}
1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IAAI,CAAC,CAAC;QAChF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,oBAAqB,aAAa,CAAC;aACpD,WAAW,wBAAmB,CAAC;IACpC,CAAC;CACF;AA7DD,oCA6DC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport {\r\n DeclarationReference,\r\n Meaning,\r\n Navigation,\r\n Component\r\n} from '@microsoft/tsdoc/lib/beta/DeclarationReference';\r\nimport { Excerpt, IExcerptTokenRange } from '../mixins/Excerpt';\r\nimport { ApiItemKind } from '../items/ApiItem';\r\nimport { ApiDeclaredItem, IApiDeclaredItemOptions, IApiDeclaredItemJson } from '../items/ApiDeclaredItem';\r\nimport { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\r\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\r\nimport {\r\n ApiTypeParameterListMixin,\r\n IApiTypeParameterListMixinOptions,\r\n IApiTypeParameterListMixinJson\r\n} from '../mixins/ApiTypeParameterListMixin';\r\nimport { DeserializerContext } from './DeserializerContext';\r\n\r\n/**\r\n * Constructor options for {@link ApiTypeAlias}.\r\n * @public\r\n */\r\nexport interface IApiTypeAliasOptions\r\n extends IApiNameMixinOptions,\r\n IApiReleaseTagMixinOptions,\r\n IApiDeclaredItemOptions,\r\n IApiTypeParameterListMixinOptions {\r\n typeTokenRange: IExcerptTokenRange;\r\n}\r\n\r\nexport interface IApiTypeAliasJson extends IApiDeclaredItemJson, IApiTypeParameterListMixinJson {\r\n typeTokenRange: IExcerptTokenRange;\r\n}\r\n\r\n/**\r\n * Represents a TypeScript type alias declaration.\r\n *\r\n * @remarks\r\n *\r\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\r\n * API declarations.\r\n *\r\n * `ApiTypeAlias` represents a definition such as one of these examples:\r\n *\r\n * ```ts\r\n * // A union type:\r\n * export type Shape = Square | Triangle | Circle;\r\n *\r\n * // A generic type alias:\r\n * export type BoxedValue<T> = { value: T };\r\n *\r\n * export type BoxedArray<T> = { array: T[] };\r\n *\r\n * // A conditional type alias:\r\n * export type Boxed<T> = T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;\r\n *\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class ApiTypeAlias extends ApiTypeParameterListMixin(\r\n ApiNameMixin(ApiReleaseTagMixin(ApiDeclaredItem))\r\n) {\r\n /**\r\n * An {@link Excerpt} that describes the type of the alias.\r\n *\r\n * @remarks\r\n * In the example below, the `typeExcerpt` would correspond to the subexpression\r\n * `T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;`:\r\n *\r\n * ```ts\r\n * export type Boxed<T> = T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;\r\n * ```\r\n */\r\n public readonly typeExcerpt: Excerpt;\r\n\r\n public constructor(options: IApiTypeAliasOptions) {\r\n super(options);\r\n\r\n this.typeExcerpt = this.buildExcerpt(options.typeTokenRange);\r\n }\r\n\r\n /** @override */\r\n public static onDeserializeInto(\r\n options: Partial<IApiTypeAliasOptions>,\r\n context: DeserializerContext,\r\n jsonObject: IApiTypeAliasJson\r\n ): void {\r\n super.onDeserializeInto(options, context, jsonObject);\r\n\r\n options.typeTokenRange = jsonObject.typeTokenRange;\r\n }\r\n\r\n public static getContainerKey(name: string): string {\r\n return `${name}|${ApiItemKind.TypeAlias}`;\r\n }\r\n\r\n /** @override */\r\n public get kind(): ApiItemKind {\r\n return ApiItemKind.TypeAlias;\r\n }\r\n\r\n /** @override */\r\n public get containerKey(): string {\r\n return ApiTypeAlias.getContainerKey(this.name);\r\n }\r\n\r\n /** @override */\r\n public serializeInto(jsonObject: Partial<IApiTypeAliasJson>): void {\r\n super.serializeInto(jsonObject);\r\n\r\n jsonObject.typeTokenRange = this.typeExcerpt.tokenRange;\r\n }\r\n\r\n /** @beta @override */\r\n public buildCanonicalReference(): DeclarationReference {\r\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\r\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\r\n .addNavigationStep(Navigation.Exports, nameComponent)\r\n .withMeaning(Meaning.TypeAlias);\r\n }\r\n}\r\n"]}
@@ -46,9 +46,9 @@ export declare class ApiVariable extends ApiVariable_base {
46
46
  static onDeserializeInto(options: Partial<IApiVariableOptions>, context: DeserializerContext, jsonObject: IApiVariableJson): void;
47
47
  static getContainerKey(name: string): string;
48
48
  /** @override */
49
- readonly kind: ApiItemKind;
49
+ get kind(): ApiItemKind;
50
50
  /** @override */
51
- readonly containerKey: string;
51
+ get containerKey(): string;
52
52
  /** @override */
53
53
  serializeInto(jsonObject: Partial<IApiVariableJson>): void;
54
54
  /** @beta @override */
@@ -1 +1 @@
1
- {"version":3,"file":"ApiVariable.d.ts","sourceRoot":"","sources":["../../src/model/ApiVariable.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC1G,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH,MAAM,WAAW,mBACf,SAAQ,oBAAoB,EAC1B,0BAA0B,EAC1B,uBAAuB;IACzB,sBAAsB,EAAE,kBAAkB,CAAC;CAC5C;A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AAuB;IACzB,sBAAsB,EAAE,kBAAkB,CAAC;CAC5C;AAED,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,sBAAsB,EAAE,kBAAkB,CAAC;CAC5C;;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,WAAY,SAAQ,gBAAiD;IAChF;;OAEG;IACH,SAAgB,mBAAmB,EAAE,OAAO,CAAC;gBAE1B,OAAO,EAAE,mBAAmB;IAM/C,gBAAgB;WACF,iBAAiB,CAC7B,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,EACrC,OAAO,EAAE,mBAAmB,EAC5B,UAAU,EAAE,gBAAgB,GAC3B,IAAI;WAMO,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAInD,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,gBAAgB;IACT,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI;IAMjE,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAMvD"}
@@ -2,6 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ApiVariable = void 0;
5
6
  const DeclarationReference_1 = require("@microsoft/tsdoc/lib/beta/DeclarationReference");
6
7
  const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
7
8
  const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
@@ -1 +1 @@
1
- {"version":3,"file":"ApiVariable.js","sourceRoot":"","sources":["../../src/model/ApiVariable.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAE3D,yFAKwD;AAExD,8DAA0G;AAC1G,qEAA8F;AAC9F,yDAA4E;AAmB5E;;;;;;;;;;;;;;;;;;;GAmBG;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AmDC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport {\r\n DeclarationReference,\r\n Meaning,\r\n Navigation,\r\n Component\r\n} from '@microsoft/tsdoc/lib/beta/DeclarationReference';\r\nimport { ApiItemKind } from '../items/ApiItem';\r\nimport { ApiDeclaredItem, IApiDeclaredItemOptions, IApiDeclaredItemJson } from '../items/ApiDeclaredItem';\r\nimport { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\r\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\r\nimport { IExcerptTokenRange, Excerpt } from '../mixins/Excerpt';\r\nimport { DeserializerContext } from './DeserializerContext';\r\n\r\n/**\r\n * Constructor options for {@link ApiVariable}.\r\n * @public\r\n */\r\nexport interface IApiVariableOptions\r\n extends IApiNameMixinOptions,\r\n IApiReleaseTagMixinOptions,\r\n IApiDeclaredItemOptions {\r\n variableTypeTokenRange: IExcerptTokenRange;\r\n}\r\n\r\nexport interface IApiVariableJson extends IApiDeclaredItemJson {\r\n variableTypeTokenRange: IExcerptTokenRange;\r\n}\r\n\r\n/**\r\n * Represents a TypeScript variable declaration.\r\n *\r\n * @remarks\r\n *\r\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\r\n * API declarations.\r\n *\r\n * `ApiVariable` represents an exported `const` or `let` object such as these examples:\r\n *\r\n * ```ts\r\n * // A variable declaration\r\n * export let verboseLogging: boolean;\r\n *\r\n * // A constant variable declaration with an initializer\r\n * export const canvas: IWidget = createCanvas();\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class ApiVariable extends ApiNameMixin(ApiReleaseTagMixin(ApiDeclaredItem)) {\r\n /**\r\n * An {@link Excerpt} that describes the type of the variable.\r\n */\r\n public readonly variableTypeExcerpt: Excerpt;\r\n\r\n public constructor(options: IApiVariableOptions) {\r\n super(options);\r\n\r\n this.variableTypeExcerpt = this.buildExcerpt(options.variableTypeTokenRange);\r\n }\r\n\r\n /** @override */\r\n public static onDeserializeInto(\r\n options: Partial<IApiVariableOptions>,\r\n context: DeserializerContext,\r\n jsonObject: IApiVariableJson\r\n ): void {\r\n super.onDeserializeInto(options, context, jsonObject);\r\n\r\n options.variableTypeTokenRange = jsonObject.variableTypeTokenRange;\r\n }\r\n\r\n public static getContainerKey(name: string): string {\r\n return `${name}|${ApiItemKind.Variable}`;\r\n }\r\n\r\n /** @override */\r\n public get kind(): ApiItemKind {\r\n return ApiItemKind.Variable;\r\n }\r\n\r\n /** @override */\r\n public get containerKey(): string {\r\n return ApiVariable.getContainerKey(this.name);\r\n }\r\n\r\n /** @override */\r\n public serializeInto(jsonObject: Partial<IApiVariableJson>): void {\r\n super.serializeInto(jsonObject);\r\n\r\n jsonObject.variableTypeTokenRange = this.variableTypeExcerpt.tokenRange;\r\n }\r\n\r\n /** @beta @override */\r\n public buildCanonicalReference(): DeclarationReference {\r\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\r\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\r\n .addNavigationStep(Navigation.Exports, nameComponent)\r\n .withMeaning(Meaning.Variable);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ApiVariable.js","sourceRoot":"","sources":["../../src/model/ApiVariable.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,yFAKwD;AAExD,8DAA0G;AAC1G,qEAA8F;AAC9F,yDAA4E;AAmB5E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,WAAY,SAAQ,2BAAY,CAAC,uCAAkB,CAAC,iCAAe,CAAC,CAAC;IAMhF,YAAmB,OAA4B;QAC7C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC/E,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,iBAAiB,CAC7B,OAAqC,EACrC,OAA4B,EAC5B,UAA4B;QAE5B,KAAK,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAEtD,OAAO,CAAC,sBAAsB,GAAG,UAAU,CAAC,sBAAsB,CAAC;IACrE,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,yBAAoB,EAAE,CAAC;IAC3C,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,iCAA4B;IAC9B,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,gBAAgB;IACT,aAAa,CAAC,UAAqC;QACxD,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAEhC,UAAU,CAAC,sBAAsB,GAAG,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC;IAC1E,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,oBAAqB,aAAa,CAAC;aACpD,WAAW,sBAAkB,CAAC;IACnC,CAAC;CACF;AAnDD,kCAmDC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport {\r\n DeclarationReference,\r\n Meaning,\r\n Navigation,\r\n Component\r\n} from '@microsoft/tsdoc/lib/beta/DeclarationReference';\r\nimport { ApiItemKind } from '../items/ApiItem';\r\nimport { ApiDeclaredItem, IApiDeclaredItemOptions, IApiDeclaredItemJson } from '../items/ApiDeclaredItem';\r\nimport { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\r\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\r\nimport { IExcerptTokenRange, Excerpt } from '../mixins/Excerpt';\r\nimport { DeserializerContext } from './DeserializerContext';\r\n\r\n/**\r\n * Constructor options for {@link ApiVariable}.\r\n * @public\r\n */\r\nexport interface IApiVariableOptions\r\n extends IApiNameMixinOptions,\r\n IApiReleaseTagMixinOptions,\r\n IApiDeclaredItemOptions {\r\n variableTypeTokenRange: IExcerptTokenRange;\r\n}\r\n\r\nexport interface IApiVariableJson extends IApiDeclaredItemJson {\r\n variableTypeTokenRange: IExcerptTokenRange;\r\n}\r\n\r\n/**\r\n * Represents a TypeScript variable declaration.\r\n *\r\n * @remarks\r\n *\r\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\r\n * API declarations.\r\n *\r\n * `ApiVariable` represents an exported `const` or `let` object such as these examples:\r\n *\r\n * ```ts\r\n * // A variable declaration\r\n * export let verboseLogging: boolean;\r\n *\r\n * // A constant variable declaration with an initializer\r\n * export const canvas: IWidget = createCanvas();\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class ApiVariable extends ApiNameMixin(ApiReleaseTagMixin(ApiDeclaredItem)) {\r\n /**\r\n * An {@link Excerpt} that describes the type of the variable.\r\n */\r\n public readonly variableTypeExcerpt: Excerpt;\r\n\r\n public constructor(options: IApiVariableOptions) {\r\n super(options);\r\n\r\n this.variableTypeExcerpt = this.buildExcerpt(options.variableTypeTokenRange);\r\n }\r\n\r\n /** @override */\r\n public static onDeserializeInto(\r\n options: Partial<IApiVariableOptions>,\r\n context: DeserializerContext,\r\n jsonObject: IApiVariableJson\r\n ): void {\r\n super.onDeserializeInto(options, context, jsonObject);\r\n\r\n options.variableTypeTokenRange = jsonObject.variableTypeTokenRange;\r\n }\r\n\r\n public static getContainerKey(name: string): string {\r\n return `${name}|${ApiItemKind.Variable}`;\r\n }\r\n\r\n /** @override */\r\n public get kind(): ApiItemKind {\r\n return ApiItemKind.Variable;\r\n }\r\n\r\n /** @override */\r\n public get containerKey(): string {\r\n return ApiVariable.getContainerKey(this.name);\r\n }\r\n\r\n /** @override */\r\n public serializeInto(jsonObject: Partial<IApiVariableJson>): void {\r\n super.serializeInto(jsonObject);\r\n\r\n jsonObject.variableTypeTokenRange = this.variableTypeExcerpt.tokenRange;\r\n }\r\n\r\n /** @beta @override */\r\n public buildCanonicalReference(): DeclarationReference {\r\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\r\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\r\n .addNavigationStep(Navigation.Exports, nameComponent)\r\n .withMeaning(Meaning.Variable);\r\n }\r\n}\r\n"]}
@@ -2,6 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Deserializer = void 0;
5
6
  const ApiClass_1 = require("./ApiClass");
6
7
  const ApiEntryPoint_1 = require("./ApiEntryPoint");
7
8
  const ApiMethod_1 = require("./ApiMethod");
@@ -1 +1 @@
1
- {"version":3,"file":"Deserializer.js","sourceRoot":"","sources":["../../src/model/Deserializer.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAG3D,yCAAuE;AACvE,mDAAuE;AACvE,2CAA2D;AAC3D,yCAAsC;AACtC,iDAAoE;AACpE,6CAA8D;AAC9D,iDAAuF;AACvF,iEAA4F;AAC5F,6DAAsF;AACtF,+CAAiE;AACjE,mDAA2F;AAC3F,uCAAqD;AAErD,qDAA0E;AAC1E,mEAA+F;AAC/F,+CAAiE;AACjE,yDAAgF;AAChF,2DAAmF;AACnF,iDAAuF;AACvF,+CAAmF;AAInF,MAAa,YAAY;IAChB,MAAM,CAAC,WAAW,CAAC,OAA4B,EAAE,UAAwB;QAC9E,MAAM,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AAC,OAAO,EAAE,OAAO,EAAE,UAA8B,CAAC,CAAC;gBAChF,OAAO,IAAI,yBAAW,CAAC,OAA8B,CAAC,CAAC;YACzD;gBACE,MAAM,IAAI,KAAK,CAAC,mDAAmD,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SACzG;IACH,CAAC;CACF;AAjED,oCAiEC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { IApiItemJson, IApiItemOptions, ApiItem, ApiItemKind } from '../items/ApiItem';\r\nimport { ApiClass, IApiClassOptions, IApiClassJson } from './ApiClass';\r\nimport { ApiEntryPoint, IApiEntryPointOptions } from './ApiEntryPoint';\r\nimport { ApiMethod, IApiMethodOptions } from './ApiMethod';\r\nimport { ApiModel } from './ApiModel';\r\nimport { ApiNamespace, IApiNamespaceOptions } from './ApiNamespace';\r\nimport { ApiPackage, IApiPackageOptions } from './ApiPackage';\r\nimport { ApiInterface, IApiInterfaceOptions, IApiInterfaceJson } from './ApiInterface';\r\nimport { ApiPropertySignature, IApiPropertySignatureOptions } from './ApiPropertySignature';\r\nimport { ApiMethodSignature, IApiMethodSignatureOptions } from './ApiMethodSignature';\r\nimport { ApiProperty, IApiPropertyOptions } from './ApiProperty';\r\nimport { ApiEnumMember, IApiEnumMemberOptions, IApiEnumMemberJson } from './ApiEnumMember';\r\nimport { ApiEnum, IApiEnumOptions } from './ApiEnum';\r\nimport { IApiPropertyItemJson } from '../items/ApiPropertyItem';\r\nimport { ApiConstructor, IApiConstructorOptions } from './ApiConstructor';\r\nimport { ApiConstructSignature, IApiConstructSignatureOptions } from './ApiConstructSignature';\r\nimport { ApiFunction, IApiFunctionOptions } from './ApiFunction';\r\nimport { ApiCallSignature, IApiCallSignatureOptions } from './ApiCallSignature';\r\nimport { ApiIndexSignature, IApiIndexSignatureOptions } from './ApiIndexSignature';\r\nimport { ApiTypeAlias, IApiTypeAliasOptions, IApiTypeAliasJson } from './ApiTypeAlias';\r\nimport { ApiVariable, IApiVariableOptions, IApiVariableJson } from './ApiVariable';\r\nimport { IApiDeclaredItemJson } from '../items/ApiDeclaredItem';\r\nimport { DeserializerContext } from './DeserializerContext';\r\n\r\nexport class Deserializer {\r\n public static deserialize(context: DeserializerContext, jsonObject: IApiItemJson): ApiItem {\r\n const options: Partial<IApiItemOptions> = {};\r\n\r\n switch (jsonObject.kind) {\r\n case ApiItemKind.Class:\r\n ApiClass.onDeserializeInto(options, context, jsonObject as IApiClassJson);\r\n return new ApiClass(options as IApiClassOptions);\r\n case ApiItemKind.CallSignature:\r\n ApiCallSignature.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiCallSignature(options as IApiCallSignatureOptions);\r\n case ApiItemKind.Constructor:\r\n ApiConstructor.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiConstructor(options as IApiConstructorOptions);\r\n case ApiItemKind.ConstructSignature:\r\n ApiConstructSignature.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiConstructSignature(options as IApiConstructSignatureOptions);\r\n case ApiItemKind.EntryPoint:\r\n ApiEntryPoint.onDeserializeInto(options, context, jsonObject);\r\n return new ApiEntryPoint(options as IApiEntryPointOptions);\r\n case ApiItemKind.Enum:\r\n ApiEnum.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiEnum(options as IApiEnumOptions);\r\n case ApiItemKind.EnumMember:\r\n ApiEnumMember.onDeserializeInto(options, context, jsonObject as IApiEnumMemberJson);\r\n return new ApiEnumMember(options as IApiEnumMemberOptions);\r\n case ApiItemKind.Function:\r\n ApiFunction.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiFunction(options as IApiFunctionOptions);\r\n case ApiItemKind.IndexSignature:\r\n ApiIndexSignature.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiIndexSignature(options as IApiIndexSignatureOptions);\r\n case ApiItemKind.Interface:\r\n ApiInterface.onDeserializeInto(options, context, jsonObject as IApiInterfaceJson);\r\n return new ApiInterface(options as IApiInterfaceOptions);\r\n case ApiItemKind.Method:\r\n ApiMethod.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiMethod(options as IApiMethodOptions);\r\n case ApiItemKind.MethodSignature:\r\n ApiMethodSignature.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiMethodSignature(options as IApiMethodSignatureOptions);\r\n case ApiItemKind.Model:\r\n return new ApiModel();\r\n case ApiItemKind.Namespace:\r\n ApiNamespace.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiNamespace(options as IApiNamespaceOptions);\r\n case ApiItemKind.Package:\r\n ApiPackage.onDeserializeInto(options, context, jsonObject);\r\n return new ApiPackage(options as IApiPackageOptions);\r\n case ApiItemKind.Property:\r\n ApiProperty.onDeserializeInto(options, context, jsonObject as IApiPropertyItemJson);\r\n return new ApiProperty(options as IApiPropertyOptions);\r\n case ApiItemKind.PropertySignature:\r\n ApiPropertySignature.onDeserializeInto(options, context, jsonObject as IApiPropertyItemJson);\r\n return new ApiPropertySignature(options as IApiPropertySignatureOptions);\r\n case ApiItemKind.TypeAlias:\r\n ApiTypeAlias.onDeserializeInto(options, context, jsonObject as IApiTypeAliasJson);\r\n return new ApiTypeAlias(options as IApiTypeAliasOptions);\r\n case ApiItemKind.Variable:\r\n ApiVariable.onDeserializeInto(options, context, jsonObject as IApiVariableJson);\r\n return new ApiVariable(options as IApiVariableOptions);\r\n default:\r\n throw new Error(`Failed to deserialize unsupported API item type ${JSON.stringify(jsonObject.kind)}`);\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Deserializer.js","sourceRoot":"","sources":["../../src/model/Deserializer.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,yCAAuE;AACvE,mDAAuE;A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AC,OAA8B,CAAC,CAAC;YACzD;gBACE,2CAAoB,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAkC,CAAC,CAAC;gBAC7F,OAAO,IAAI,2CAAoB,CAAC,OAAuC,CAAC,CAAC;YAC3E;gBACE,2BAAY,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAA+B,CAAC,CAAC;gBAClF,OAAO,IAAI,2BAAY,CAAC,OAA+B,CAAC,CAAC;YAC3D;gBACE,yBAAW,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAA8B,CAAC,CAAC;gBAChF,OAAO,IAAI,yBAAW,CAAC,OAA8B,CAAC,CAAC;YACzD;gBACE,MAAM,IAAI,KAAK,CAAC,mDAAmD,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SACzG;IACH,CAAC;CACF;AAjED,oCAiEC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { IApiItemJson, IApiItemOptions, ApiItem, ApiItemKind } from '../items/ApiItem';\r\nimport { ApiClass, IApiClassOptions, IApiClassJson } from './ApiClass';\r\nimport { ApiEntryPoint, IApiEntryPointOptions } from './ApiEntryPoint';\r\nimport { ApiMethod, IApiMethodOptions } from './ApiMethod';\r\nimport { ApiModel } from './ApiModel';\r\nimport { ApiNamespace, IApiNamespaceOptions } from './ApiNamespace';\r\nimport { ApiPackage, IApiPackageOptions } from './ApiPackage';\r\nimport { ApiInterface, IApiInterfaceOptions, IApiInterfaceJson } from './ApiInterface';\r\nimport { ApiPropertySignature, IApiPropertySignatureOptions } from './ApiPropertySignature';\r\nimport { ApiMethodSignature, IApiMethodSignatureOptions } from './ApiMethodSignature';\r\nimport { ApiProperty, IApiPropertyOptions } from './ApiProperty';\r\nimport { ApiEnumMember, IApiEnumMemberOptions, IApiEnumMemberJson } from './ApiEnumMember';\r\nimport { ApiEnum, IApiEnumOptions } from './ApiEnum';\r\nimport { IApiPropertyItemJson } from '../items/ApiPropertyItem';\r\nimport { ApiConstructor, IApiConstructorOptions } from './ApiConstructor';\r\nimport { ApiConstructSignature, IApiConstructSignatureOptions } from './ApiConstructSignature';\r\nimport { ApiFunction, IApiFunctionOptions } from './ApiFunction';\r\nimport { ApiCallSignature, IApiCallSignatureOptions } from './ApiCallSignature';\r\nimport { ApiIndexSignature, IApiIndexSignatureOptions } from './ApiIndexSignature';\r\nimport { ApiTypeAlias, IApiTypeAliasOptions, IApiTypeAliasJson } from './ApiTypeAlias';\r\nimport { ApiVariable, IApiVariableOptions, IApiVariableJson } from './ApiVariable';\r\nimport { IApiDeclaredItemJson } from '../items/ApiDeclaredItem';\r\nimport { DeserializerContext } from './DeserializerContext';\r\n\r\nexport class Deserializer {\r\n public static deserialize(context: DeserializerContext, jsonObject: IApiItemJson): ApiItem {\r\n const options: Partial<IApiItemOptions> = {};\r\n\r\n switch (jsonObject.kind) {\r\n case ApiItemKind.Class:\r\n ApiClass.onDeserializeInto(options, context, jsonObject as IApiClassJson);\r\n return new ApiClass(options as IApiClassOptions);\r\n case ApiItemKind.CallSignature:\r\n ApiCallSignature.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiCallSignature(options as IApiCallSignatureOptions);\r\n case ApiItemKind.Constructor:\r\n ApiConstructor.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiConstructor(options as IApiConstructorOptions);\r\n case ApiItemKind.ConstructSignature:\r\n ApiConstructSignature.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiConstructSignature(options as IApiConstructSignatureOptions);\r\n case ApiItemKind.EntryPoint:\r\n ApiEntryPoint.onDeserializeInto(options, context, jsonObject);\r\n return new ApiEntryPoint(options as IApiEntryPointOptions);\r\n case ApiItemKind.Enum:\r\n ApiEnum.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiEnum(options as IApiEnumOptions);\r\n case ApiItemKind.EnumMember:\r\n ApiEnumMember.onDeserializeInto(options, context, jsonObject as IApiEnumMemberJson);\r\n return new ApiEnumMember(options as IApiEnumMemberOptions);\r\n case ApiItemKind.Function:\r\n ApiFunction.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiFunction(options as IApiFunctionOptions);\r\n case ApiItemKind.IndexSignature:\r\n ApiIndexSignature.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiIndexSignature(options as IApiIndexSignatureOptions);\r\n case ApiItemKind.Interface:\r\n ApiInterface.onDeserializeInto(options, context, jsonObject as IApiInterfaceJson);\r\n return new ApiInterface(options as IApiInterfaceOptions);\r\n case ApiItemKind.Method:\r\n ApiMethod.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiMethod(options as IApiMethodOptions);\r\n case ApiItemKind.MethodSignature:\r\n ApiMethodSignature.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiMethodSignature(options as IApiMethodSignatureOptions);\r\n case ApiItemKind.Model:\r\n return new ApiModel();\r\n case ApiItemKind.Namespace:\r\n ApiNamespace.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\r\n return new ApiNamespace(options as IApiNamespaceOptions);\r\n case ApiItemKind.Package:\r\n ApiPackage.onDeserializeInto(options, context, jsonObject);\r\n return new ApiPackage(options as IApiPackageOptions);\r\n case ApiItemKind.Property:\r\n ApiProperty.onDeserializeInto(options, context, jsonObject as IApiPropertyItemJson);\r\n return new ApiProperty(options as IApiPropertyOptions);\r\n case ApiItemKind.PropertySignature:\r\n ApiPropertySignature.onDeserializeInto(options, context, jsonObject as IApiPropertyItemJson);\r\n return new ApiPropertySignature(options as IApiPropertySignatureOptions);\r\n case ApiItemKind.TypeAlias:\r\n ApiTypeAlias.onDeserializeInto(options, context, jsonObject as IApiTypeAliasJson);\r\n return new ApiTypeAlias(options as IApiTypeAliasOptions);\r\n case ApiItemKind.Variable:\r\n ApiVariable.onDeserializeInto(options, context, jsonObject as IApiVariableJson);\r\n return new ApiVariable(options as IApiVariableOptions);\r\n default:\r\n throw new Error(`Failed to deserialize unsupported API item type ${JSON.stringify(jsonObject.kind)}`);\r\n }\r\n }\r\n}\r\n"]}
@@ -2,6 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.DeserializerContext = exports.ApiJsonSchemaVersion = void 0;
5
6
  var ApiJsonSchemaVersion;
6
7
  (function (ApiJsonSchemaVersion) {
7
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"DeserializerContext.js","sourceRoot":"","sources":["../../src/model/DeserializerContext.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAE3D,IAAY,oBAgDX;AAhDD,WAAY,oBAAoB;IAC9B;;OAEG;IACH,sEAAa,CAAA;IAEb;;OAEG;IACH,sEAAa,CAAA;IAEb;;OAEG;IACH,sEAAa,CAAA;IAEb;;;;;OAKG;IACH,sEAAa,CAAA;IAEb;;;;;OAKG;IACH,sEAAe,CAAA;IAEf;;;;;OAKG;IACH,0FAAyB,CAAA;IAEzB;;;;;;OAMG;IACH,8GAAmC,CAAA;AACrC,CAAC,EAhDW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAgD/B;AAED,MAAa,mBAAmB;IAqB9B,YAAmB,OAA4B;QAC7C,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;QAC/C,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAC3D,CAAC;CACF;AA3BD,kDA2BC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nexport enum ApiJsonSchemaVersion {\r\n /**\r\n * The initial release.\r\n */\r\n V_1000 = 1000,\r\n\r\n /**\r\n * Add support for type parameters and type alias types.\r\n */\r\n V_1001 = 1001,\r\n\r\n /**\r\n * Remove \"canonicalReference\" field. This field was for diagnostic purposes only and was never deserialized.\r\n */\r\n V_1002 = 1002,\r\n\r\n /**\r\n * Reintroduce the \"canonicalReference\" field using the experimental new TSDoc declaration reference notation.\r\n *\r\n * This is not a breaking change because this field is never deserialized; it is provided for informational\r\n * purposes only.\r\n */\r\n V_1003 = 1003,\r\n\r\n /**\r\n * The current latest .api.json schema version.\r\n *\r\n * IMPORTANT: When incrementing this number, consider whether `OLDEST_SUPPORTED` or `OLDEST_FORWARDS_COMPATIBLE`\r\n * should be updated.\r\n */\r\n LATEST = V_1003,\r\n\r\n /**\r\n * The oldest .api.json schema version that is still supported for backwards compatibility.\r\n *\r\n * This must be updated if you change to the file format and do not implement compatibility logic for\r\n * deserializing the older representation.\r\n */\r\n OLDEST_SUPPORTED = V_1001,\r\n\r\n /**\r\n * Used to assign `IApiPackageMetadataJson.oldestForwardsCompatibleVersion`.\r\n *\r\n * This value must be \\<= `ApiJsonSchemaVersion.LATEST`. It must be reset to the `LATEST` value\r\n * if the older library would not be able to deserialize your new file format. Adding a nonessential field\r\n * is generally okay. Removing, modifying, or reinterpreting existing fields is NOT safe.\r\n */\r\n OLDEST_FORWARDS_COMPATIBLE = V_1001\r\n}\r\n\r\nexport class DeserializerContext {\r\n /**\r\n * The path of the file being deserialized, which may be useful for diagnostic purposes.\r\n */\r\n public readonly apiJsonFilename: string;\r\n\r\n /**\r\n * Metadata from `IApiPackageMetadataJson.toolPackage`.\r\n */\r\n public readonly toolPackage: string;\r\n\r\n /**\r\n * Metadata from `IApiPackageMetadataJson.toolVersion`.\r\n */\r\n public readonly toolVersion: string;\r\n\r\n /**\r\n * The version of the schema being deserialized, as obtained from `IApiPackageMetadataJson.schemaVersion`.\r\n */\r\n public readonly versionToDeserialize: ApiJsonSchemaVersion;\r\n\r\n public constructor(options: DeserializerContext) {\r\n this.apiJsonFilename = options.apiJsonFilename;\r\n this.toolPackage = options.toolPackage;\r\n this.toolVersion = options.toolVersion;\r\n this.versionToDeserialize = options.versionToDeserialize;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"DeserializerContext.js","sourceRoot":"","sources":["../../src/model/DeserializerContext.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,IAAY,oBAgDX;AAhDD,WAAY,oBAAoB;IAC9B;;OAEG;IACH,sEAAa,CAAA;IAEb;;OAEG;IACH,sEAAa,CAAA;IAEb;;OAEG;IACH,sEAAa,CAAA;IAEb;;;;;OAKG;IACH,sEAAa,CAAA;IAEb;;;;;OAKG;IACH,sEAAe,CAAA;IAEf;;;;;OAKG;IACH,0FAAyB,CAAA;IAEzB;;;;;;OAMG;IACH,8GAAmC,CAAA;AACrC,CAAC,EAhDW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAgD/B;AAED,MAAa,mBAAmB;IAqB9B,YAAmB,OAA4B;QAC7C,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;QAC/C,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAC3D,CAAC;CACF;AA3BD,kDA2BC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nexport enum ApiJsonSchemaVersion {\r\n /**\r\n * The initial release.\r\n */\r\n V_1000 = 1000,\r\n\r\n /**\r\n * Add support for type parameters and type alias types.\r\n */\r\n V_1001 = 1001,\r\n\r\n /**\r\n * Remove \"canonicalReference\" field. This field was for diagnostic purposes only and was never deserialized.\r\n */\r\n V_1002 = 1002,\r\n\r\n /**\r\n * Reintroduce the \"canonicalReference\" field using the experimental new TSDoc declaration reference notation.\r\n *\r\n * This is not a breaking change because this field is never deserialized; it is provided for informational\r\n * purposes only.\r\n */\r\n V_1003 = 1003,\r\n\r\n /**\r\n * The current latest .api.json schema version.\r\n *\r\n * IMPORTANT: When incrementing this number, consider whether `OLDEST_SUPPORTED` or `OLDEST_FORWARDS_COMPATIBLE`\r\n * should be updated.\r\n */\r\n LATEST = V_1003,\r\n\r\n /**\r\n * The oldest .api.json schema version that is still supported for backwards compatibility.\r\n *\r\n * This must be updated if you change to the file format and do not implement compatibility logic for\r\n * deserializing the older representation.\r\n */\r\n OLDEST_SUPPORTED = V_1001,\r\n\r\n /**\r\n * Used to assign `IApiPackageMetadataJson.oldestForwardsCompatibleVersion`.\r\n *\r\n * This value must be \\<= `ApiJsonSchemaVersion.LATEST`. It must be reset to the `LATEST` value\r\n * if the older library would not be able to deserialize your new file format. Adding a nonessential field\r\n * is generally okay. Removing, modifying, or reinterpreting existing fields is NOT safe.\r\n */\r\n OLDEST_FORWARDS_COMPATIBLE = V_1001\r\n}\r\n\r\nexport class DeserializerContext {\r\n /**\r\n * The path of the file being deserialized, which may be useful for diagnostic purposes.\r\n */\r\n public readonly apiJsonFilename: string;\r\n\r\n /**\r\n * Metadata from `IApiPackageMetadataJson.toolPackage`.\r\n */\r\n public readonly toolPackage: string;\r\n\r\n /**\r\n * Metadata from `IApiPackageMetadataJson.toolVersion`.\r\n */\r\n public readonly toolVersion: string;\r\n\r\n /**\r\n * The version of the schema being deserialized, as obtained from `IApiPackageMetadataJson.schemaVersion`.\r\n */\r\n public readonly versionToDeserialize: ApiJsonSchemaVersion;\r\n\r\n public constructor(options: DeserializerContext) {\r\n this.apiJsonFilename = options.apiJsonFilename;\r\n this.toolPackage = options.toolPackage;\r\n this.toolVersion = options.toolVersion;\r\n this.versionToDeserialize = options.versionToDeserialize;\r\n }\r\n}\r\n"]}
@@ -2,6 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.HeritageType = void 0;
5
6
  /**
6
7
  * Represents a type referenced via an "extends" or "implements" heritage clause for a TypeScript class.
7
8
  * @remarks
@@ -1 +1 @@
1
- {"version":3,"file":"HeritageType.js","sourceRoot":"","sources":["../../src/model/HeritageType.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAI3D;;;;;;;;;;;;;;GAcG;AACH,MAAa,YAAY;IAiBvB,YAAmB,OAAgB;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AApBD,oCAoBC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { Excerpt } from '../mixins/Excerpt';\r\n\r\n/**\r\n * Represents a type referenced via an \"extends\" or \"implements\" heritage clause for a TypeScript class.\r\n * @remarks\r\n *\r\n * For example, consider this declaration:\r\n *\r\n * ```ts\r\n * export class Widget extends Controls.WidgetBase implements Controls.IWidget, IDisposable {\r\n * // . . .\r\n * }\r\n * ```\r\n *\r\n * The heritage types are `Controls.WidgetBase`, `Controls.IWidget`, and `IDisposable`.\r\n * @public\r\n */\r\nexport class HeritageType {\r\n /**\r\n * An excerpt corresponding to the referenced type.\r\n * @remarks\r\n *\r\n * For example, consider this declaration:\r\n *\r\n * ```ts\r\n * export class Widget extends Controls.WidgetBase implements Controls.IWidget, IDisposable {\r\n * // . . .\r\n * }\r\n * ```\r\n *\r\n * The excerpt might be `Controls.WidgetBase`, `Controls.IWidget`, or `IDisposable`.\r\n */\r\n public readonly excerpt: Excerpt;\r\n\r\n public constructor(excerpt: Excerpt) {\r\n this.excerpt = excerpt;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"HeritageType.js","sourceRoot":"","sources":["../../src/model/HeritageType.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D;;;;;;;;;;;;;;GAcG;AACH,MAAa,YAAY;IAiBvB,YAAmB,OAAgB;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AApBD,oCAoBC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { Excerpt } from '../mixins/Excerpt';\r\n\r\n/**\r\n * Represents a type referenced via an \"extends\" or \"implements\" heritage clause for a TypeScript class.\r\n * @remarks\r\n *\r\n * For example, consider this declaration:\r\n *\r\n * ```ts\r\n * export class Widget extends Controls.WidgetBase implements Controls.IWidget, IDisposable {\r\n * // . . .\r\n * }\r\n * ```\r\n *\r\n * The heritage types are `Controls.WidgetBase`, `Controls.IWidget`, and `IDisposable`.\r\n * @public\r\n */\r\nexport class HeritageType {\r\n /**\r\n * An excerpt corresponding to the referenced type.\r\n * @remarks\r\n *\r\n * For example, consider this declaration:\r\n *\r\n * ```ts\r\n * export class Widget extends Controls.WidgetBase implements Controls.IWidget, IDisposable {\r\n * // . . .\r\n * }\r\n * ```\r\n *\r\n * The excerpt might be `Controls.WidgetBase`, `Controls.IWidget`, or `IDisposable`.\r\n */\r\n public readonly excerpt: Excerpt;\r\n\r\n public constructor(excerpt: Excerpt) {\r\n this.excerpt = excerpt;\r\n }\r\n}\r\n"]}
@@ -2,6 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ModelReferenceResolver = void 0;
5
6
  const ApiItemContainerMixin_1 = require("../mixins/ApiItemContainerMixin");
6
7
  const ApiParameterListMixin_1 = require("../mixins/ApiParameterListMixin");
7
8
  /**