@microsoft/api-extractor-model 7.30.9 → 7.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/CHANGELOG.json +17 -0
  2. package/CHANGELOG.md +8 -1
  3. package/dist/tsdoc-metadata.json +1 -1
  4. package/lib/items/ApiDeclaredItem.d.ts.map +1 -1
  5. package/lib/items/ApiDeclaredItem.js.map +1 -1
  6. package/lib/items/ApiDocumentedItem.d.ts.map +1 -1
  7. package/lib/items/ApiDocumentedItem.js.map +1 -1
  8. package/lib/items/ApiItem.d.ts.map +1 -1
  9. package/lib/items/ApiItem.js +1 -1
  10. package/lib/items/ApiItem.js.map +1 -1
  11. package/lib/mixins/ApiExportedMixin.d.ts.map +1 -1
  12. package/lib/mixins/ApiExportedMixin.js.map +1 -1
  13. package/lib/mixins/ApiInitializerMixin.d.ts.map +1 -1
  14. package/lib/mixins/ApiInitializerMixin.js +2 -1
  15. package/lib/mixins/ApiInitializerMixin.js.map +1 -1
  16. package/lib/mixins/ApiItemContainerMixin.d.ts.map +1 -1
  17. package/lib/mixins/ApiItemContainerMixin.js +1 -1
  18. package/lib/mixins/ApiItemContainerMixin.js.map +1 -1
  19. package/lib/mixins/ApiParameterListMixin.d.ts.map +1 -1
  20. package/lib/mixins/ApiParameterListMixin.js +2 -1
  21. package/lib/mixins/ApiParameterListMixin.js.map +1 -1
  22. package/lib/mixins/ApiReturnTypeMixin.d.ts.map +1 -1
  23. package/lib/mixins/ApiReturnTypeMixin.js +2 -1
  24. package/lib/mixins/ApiReturnTypeMixin.js.map +1 -1
  25. package/lib/mixins/ApiTypeParameterListMixin.d.ts.map +1 -1
  26. package/lib/mixins/ApiTypeParameterListMixin.js +2 -1
  27. package/lib/mixins/ApiTypeParameterListMixin.js.map +1 -1
  28. package/lib/model/ApiCallSignature.d.ts.map +1 -1
  29. package/lib/model/ApiCallSignature.js.map +1 -1
  30. package/lib/model/ApiClass.d.ts.map +1 -1
  31. package/lib/model/ApiClass.js.map +1 -1
  32. package/lib/model/ApiConstructSignature.d.ts.map +1 -1
  33. package/lib/model/ApiConstructSignature.js.map +1 -1
  34. package/lib/model/ApiConstructor.d.ts.map +1 -1
  35. package/lib/model/ApiConstructor.js.map +1 -1
  36. package/lib/model/ApiEntryPoint.d.ts.map +1 -1
  37. package/lib/model/ApiEntryPoint.js.map +1 -1
  38. package/lib/model/ApiEnum.d.ts.map +1 -1
  39. package/lib/model/ApiEnum.js.map +1 -1
  40. package/lib/model/ApiEnumMember.d.ts.map +1 -1
  41. package/lib/model/ApiEnumMember.js.map +1 -1
  42. package/lib/model/ApiFunction.d.ts.map +1 -1
  43. package/lib/model/ApiFunction.js.map +1 -1
  44. package/lib/model/ApiIndexSignature.d.ts.map +1 -1
  45. package/lib/model/ApiIndexSignature.js.map +1 -1
  46. package/lib/model/ApiInterface.d.ts.map +1 -1
  47. package/lib/model/ApiInterface.js.map +1 -1
  48. package/lib/model/ApiMethod.d.ts.map +1 -1
  49. package/lib/model/ApiMethod.js.map +1 -1
  50. package/lib/model/ApiMethodSignature.d.ts.map +1 -1
  51. package/lib/model/ApiMethodSignature.js.map +1 -1
  52. package/lib/model/ApiModel.d.ts +1 -1
  53. package/lib/model/ApiModel.d.ts.map +1 -1
  54. package/lib/model/ApiModel.js +2 -2
  55. package/lib/model/ApiModel.js.map +1 -1
  56. package/lib/model/ApiNamespace.d.ts.map +1 -1
  57. package/lib/model/ApiNamespace.js.map +1 -1
  58. package/lib/model/ApiPackage.d.ts +2 -2
  59. package/lib/model/ApiPackage.d.ts.map +1 -1
  60. package/lib/model/ApiPackage.js +3 -3
  61. package/lib/model/ApiPackage.js.map +1 -1
  62. package/lib/model/ApiProperty.d.ts.map +1 -1
  63. package/lib/model/ApiProperty.js.map +1 -1
  64. package/lib/model/ApiPropertySignature.d.ts.map +1 -1
  65. package/lib/model/ApiPropertySignature.js.map +1 -1
  66. package/lib/model/ApiTypeAlias.d.ts.map +1 -1
  67. package/lib/model/ApiTypeAlias.js.map +1 -1
  68. package/lib/model/ApiVariable.d.ts.map +1 -1
  69. package/lib/model/ApiVariable.js.map +1 -1
  70. package/lib/model/ModelReferenceResolver.d.ts.map +1 -1
  71. package/lib/model/ModelReferenceResolver.js.map +1 -1
  72. package/lib/model/SourceLocation.js +2 -2
  73. package/lib/model/SourceLocation.js.map +1 -1
  74. package/package.json +3 -3
@@ -4,12 +4,12 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.ApiModel = void 0;
6
6
  const DeclarationReference_1 = require("@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference");
7
+ const node_core_library_1 = require("@rushstack/node-core-library");
8
+ const tsdoc_1 = require("@microsoft/tsdoc");
7
9
  const ApiItem_1 = require("../items/ApiItem");
8
10
  const ApiItemContainerMixin_1 = require("../mixins/ApiItemContainerMixin");
9
11
  const ApiPackage_1 = require("./ApiPackage");
10
- const node_core_library_1 = require("@rushstack/node-core-library");
11
12
  const ModelReferenceResolver_1 = require("./ModelReferenceResolver");
12
- const tsdoc_1 = require("@microsoft/tsdoc");
13
13
  /**
14
14
  * A serializable representation of a collection of API declarations.
15
15
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ApiModel.js","sourceRoot":"","sources":["../../src/model/ApiModel.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAA+F;AAC/F,8CAAwD;AACxD,2EAAwE;AACxE,6CAA0C;AAC1C,oEAA2D;AAC3D,qEAA2G;AAC3G,4CAA2D;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAa,QAAS,SAAQ,IAAA,6CAAqB,EAAC,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,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AE,CAAC;IACtC,CAAC;CACF;AApJD,4BAoJC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport { ApiItem, ApiItemKind } from '../items/ApiItem';\nimport { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin';\nimport { ApiPackage } from './ApiPackage';\nimport { PackageName } from '@rushstack/node-core-library';\nimport { ModelReferenceResolver, type IResolveDeclarationReferenceResult } from './ModelReferenceResolver';\nimport { DocDeclarationReference } from '@microsoft/tsdoc';\n\n/**\n * A serializable representation of a collection of API declarations.\n *\n * @remarks\n *\n * An `ApiModel` represents a collection of API declarations that can be serialized to disk. It captures all the\n * important information needed to generate documentation, without any reliance on the TypeScript compiler engine.\n *\n * An `ApiModel` acts as the root of a tree of objects that all inherit from the `ApiItem` base class.\n * The tree children are determined by the {@link (ApiItemContainerMixin:interface)} mixin base class. The model\n * contains packages. Packages have an entry point (today, only one). And the entry point can contain various types\n * of API declarations. The container relationships might look like this:\n *\n * ```\n * Things that can contain other things:\n *\n * - ApiModel\n * - ApiPackage\n * - ApiEntryPoint\n * - ApiClass\n * - ApiMethod\n * - ApiProperty\n * - ApiEnum\n * - ApiEnumMember\n * - ApiInterface\n * - ApiMethodSignature\n * - ApiPropertySignature\n * - ApiNamespace\n * - (ApiClass, ApiEnum, ApiInterace, ...)\n *\n * ```\n *\n * Normally, API Extractor writes an .api.json file to disk for each project that it builds. Then, a tool like\n * API Documenter can load the various `ApiPackage` objects into a single `ApiModel` and process them as a group.\n * This is useful because compilation generally occurs separately (e.g. because projects may reside in different\n * Git repos, or because they build with different TypeScript compiler configurations that may be incompatible),\n * whereas API Documenter cannot detect broken hyperlinks without seeing the entire documentation set.\n *\n * @public\n */\nexport class ApiModel extends ApiItemContainerMixin(ApiItem) {\n private readonly _resolver: ModelReferenceResolver;\n\n private _packagesByName: Map<string, ApiPackage> | undefined = undefined;\n private _apiItemsByCanonicalReference: Map<string, ApiItem> | undefined = undefined;\n public constructor() {\n super({});\n\n this._resolver = new ModelReferenceResolver(this);\n }\n\n public loadPackage(apiJsonFilename: string): ApiPackage {\n const apiPackage: ApiPackage = ApiPackage.loadFromJsonFile(apiJsonFilename);\n this.addMember(apiPackage);\n return apiPackage;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Model;\n }\n\n /** @override */\n public get containerKey(): string {\n return '';\n }\n\n public get packages(): ReadonlyArray<ApiPackage> {\n return this.members as ReadonlyArray<ApiPackage>;\n }\n\n /** @override */\n public addMember(member: ApiPackage): void {\n if (member.kind !== ApiItemKind.Package) {\n throw new Error('Only items of type ApiPackage may be added to an ApiModel');\n }\n super.addMember(member);\n this._packagesByName = undefined; // invalidate the cache\n this._apiItemsByCanonicalReference = undefined; // invalidate the cache\n }\n\n /**\n * Efficiently finds a package by the NPM package name.\n *\n * @remarks\n *\n * If the NPM scope is omitted in the package name, it will still be found provided that it is an unambiguous match.\n * For example, it's often convenient to write `{@link node-core-library#JsonFile}` instead of\n * `{@link @rushstack/node-core-library#JsonFile}`.\n */\n public tryGetPackageByName(packageName: string): ApiPackage | undefined {\n // Build the lookup on demand\n if (this._packagesByName === undefined) {\n this._packagesByName = new Map<string, ApiPackage>();\n\n const unscopedMap: Map<string, ApiPackage | undefined> = new Map<string, ApiPackage | undefined>();\n\n for (const apiPackage of this.packages) {\n if (this._packagesByName.get(apiPackage.name)) {\n // This should not happen\n throw new Error(`The model contains multiple packages with the name ${apiPackage.name}`);\n }\n\n this._packagesByName.set(apiPackage.name, apiPackage);\n\n const unscopedName: string = PackageName.parse(apiPackage.name).unscopedName;\n\n if (unscopedMap.has(unscopedName)) {\n // If another package has the same unscoped name, then we won't register it\n unscopedMap.set(unscopedName, undefined);\n } else {\n unscopedMap.set(unscopedName, apiPackage);\n }\n }\n\n for (const [unscopedName, apiPackage] of unscopedMap) {\n if (apiPackage) {\n if (!this._packagesByName.has(unscopedName)) {\n // If the unscoped name is unambiguous, then we can also use it as a lookup\n this._packagesByName.set(unscopedName, apiPackage);\n }\n }\n }\n }\n\n return this._packagesByName.get(packageName);\n }\n\n public resolveDeclarationReference(\n declarationReference: DocDeclarationReference | DeclarationReference,\n contextApiItem: ApiItem | undefined\n ): IResolveDeclarationReferenceResult {\n if (declarationReference instanceof DocDeclarationReference) {\n return this._resolver.resolve(declarationReference, contextApiItem);\n } else if (declarationReference instanceof DeclarationReference) {\n // use this._apiItemsByCanonicalReference to look up ApiItem\n\n // Build the lookup on demand\n if (!this._apiItemsByCanonicalReference) {\n this._apiItemsByCanonicalReference = new Map<string, ApiItem>();\n\n for (const apiPackage of this.packages) {\n this._initApiItemsRecursive(apiPackage, this._apiItemsByCanonicalReference);\n }\n }\n\n const result: IResolveDeclarationReferenceResult = {\n resolvedApiItem: undefined,\n errorMessage: undefined\n };\n\n const apiItem: ApiItem | undefined = this._apiItemsByCanonicalReference.get(\n declarationReference.toString()\n );\n\n if (!apiItem) {\n result.errorMessage = `${declarationReference.toString()} can not be located`;\n } else {\n result.resolvedApiItem = apiItem;\n }\n\n return result;\n } else {\n // NOTE: The \"instanceof DeclarationReference\" test assumes a specific version of the @microsoft/tsdoc package.\n throw new Error(\n 'The \"declarationReference\" parameter must be an instance of' +\n ' DocDeclarationReference or DeclarationReference'\n );\n }\n }\n\n private _initApiItemsRecursive(apiItem: ApiItem, apiItemsByCanonicalReference: Map<string, ApiItem>): void {\n if (apiItem.canonicalReference && !apiItem.canonicalReference.isEmpty) {\n apiItemsByCanonicalReference.set(apiItem.canonicalReference.toString(), apiItem);\n }\n\n // Recurse container members\n if (ApiItemContainerMixin.isBaseClassOf(apiItem)) {\n for (const apiMember of apiItem.members) {\n this._initApiItemsRecursive(apiMember, apiItemsByCanonicalReference);\n }\n }\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n return DeclarationReference.empty();\n }\n}\n"]}
1
+ {"version":3,"file":"ApiModel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IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAC;YACtE,4BAA4B,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;QACnF,CAAC;QAED,4BAA4B;QAC5B,IAAI,6CAAqB,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;YACjD,KAAK,MAAM,SAAS,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;gBACxC,IAAI,CAAC,sBAAsB,CAAC,SAAS,EAAE,4BAA4B,CAAC,CAAC;YACvE,CAAC;QACH,CAAC;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.\n// See LICENSE in the project root for license information.\n\nimport { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport { PackageName } from '@rushstack/node-core-library';\nimport { DocDeclarationReference } from '@microsoft/tsdoc';\n\nimport { ApiItem, ApiItemKind } from '../items/ApiItem';\nimport { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin';\nimport { ApiPackage } from './ApiPackage';\nimport { ModelReferenceResolver, type IResolveDeclarationReferenceResult } from './ModelReferenceResolver';\n\n/**\n * A serializable representation of a collection of API declarations.\n *\n * @remarks\n *\n * An `ApiModel` represents a collection of API declarations that can be serialized to disk. It captures all the\n * important information needed to generate documentation, without any reliance on the TypeScript compiler engine.\n *\n * An `ApiModel` acts as the root of a tree of objects that all inherit from the `ApiItem` base class.\n * The tree children are determined by the {@link (ApiItemContainerMixin:interface)} mixin base class. The model\n * contains packages. Packages have an entry point (today, only one). And the entry point can contain various types\n * of API declarations. The container relationships might look like this:\n *\n * ```\n * Things that can contain other things:\n *\n * - ApiModel\n * - ApiPackage\n * - ApiEntryPoint\n * - ApiClass\n * - ApiMethod\n * - ApiProperty\n * - ApiEnum\n * - ApiEnumMember\n * - ApiInterface\n * - ApiMethodSignature\n * - ApiPropertySignature\n * - ApiNamespace\n * - (ApiClass, ApiEnum, ApiInterace, ...)\n *\n * ```\n *\n * Normally, API Extractor writes an .api.json file to disk for each project that it builds. Then, a tool like\n * API Documenter can load the various `ApiPackage` objects into a single `ApiModel` and process them as a group.\n * This is useful because compilation generally occurs separately (e.g. because projects may reside in different\n * Git repos, or because they build with different TypeScript compiler configurations that may be incompatible),\n * whereas API Documenter cannot detect broken hyperlinks without seeing the entire documentation set.\n *\n * @public\n */\nexport class ApiModel extends ApiItemContainerMixin(ApiItem) {\n private readonly _resolver: ModelReferenceResolver;\n\n private _packagesByName: Map<string, ApiPackage> | undefined = undefined;\n private _apiItemsByCanonicalReference: Map<string, ApiItem> | undefined = undefined;\n public constructor() {\n super({});\n\n this._resolver = new ModelReferenceResolver(this);\n }\n\n public loadPackage(apiJsonFilename: string): ApiPackage {\n const apiPackage: ApiPackage = ApiPackage.loadFromJsonFile(apiJsonFilename);\n this.addMember(apiPackage);\n return apiPackage;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Model;\n }\n\n /** @override */\n public get containerKey(): string {\n return '';\n }\n\n public get packages(): ReadonlyArray<ApiPackage> {\n return this.members as ReadonlyArray<ApiPackage>;\n }\n\n /** @override */\n public addMember(member: ApiPackage): void {\n if (member.kind !== ApiItemKind.Package) {\n throw new Error('Only items of type ApiPackage may be added to an ApiModel');\n }\n super.addMember(member);\n this._packagesByName = undefined; // invalidate the cache\n this._apiItemsByCanonicalReference = undefined; // invalidate the cache\n }\n\n /**\n * Efficiently finds a package by the NPM package name.\n *\n * @remarks\n *\n * If the NPM scope is omitted in the package name, it will still be found provided that it is an unambiguous match.\n * For example, it's often convenient to write `{@link node-core-library#JsonFile}` instead of\n * `{@link @rushstack/node-core-library#JsonFile}`.\n */\n public tryGetPackageByName(packageName: string): ApiPackage | undefined {\n // Build the lookup on demand\n if (this._packagesByName === undefined) {\n this._packagesByName = new Map<string, ApiPackage>();\n\n const unscopedMap: Map<string, ApiPackage | undefined> = new Map<string, ApiPackage | undefined>();\n\n for (const apiPackage of this.packages) {\n if (this._packagesByName.get(apiPackage.name)) {\n // This should not happen\n throw new Error(`The model contains multiple packages with the name ${apiPackage.name}`);\n }\n\n this._packagesByName.set(apiPackage.name, apiPackage);\n\n const unscopedName: string = PackageName.parse(apiPackage.name).unscopedName;\n\n if (unscopedMap.has(unscopedName)) {\n // If another package has the same unscoped name, then we won't register it\n unscopedMap.set(unscopedName, undefined);\n } else {\n unscopedMap.set(unscopedName, apiPackage);\n }\n }\n\n for (const [unscopedName, apiPackage] of unscopedMap) {\n if (apiPackage) {\n if (!this._packagesByName.has(unscopedName)) {\n // If the unscoped name is unambiguous, then we can also use it as a lookup\n this._packagesByName.set(unscopedName, apiPackage);\n }\n }\n }\n }\n\n return this._packagesByName.get(packageName);\n }\n\n public resolveDeclarationReference(\n declarationReference: DocDeclarationReference | DeclarationReference,\n contextApiItem: ApiItem | undefined\n ): IResolveDeclarationReferenceResult {\n if (declarationReference instanceof DocDeclarationReference) {\n return this._resolver.resolve(declarationReference, contextApiItem);\n } else if (declarationReference instanceof DeclarationReference) {\n // use this._apiItemsByCanonicalReference to look up ApiItem\n\n // Build the lookup on demand\n if (!this._apiItemsByCanonicalReference) {\n this._apiItemsByCanonicalReference = new Map<string, ApiItem>();\n\n for (const apiPackage of this.packages) {\n this._initApiItemsRecursive(apiPackage, this._apiItemsByCanonicalReference);\n }\n }\n\n const result: IResolveDeclarationReferenceResult = {\n resolvedApiItem: undefined,\n errorMessage: undefined\n };\n\n const apiItem: ApiItem | undefined = this._apiItemsByCanonicalReference.get(\n declarationReference.toString()\n );\n\n if (!apiItem) {\n result.errorMessage = `${declarationReference.toString()} can not be located`;\n } else {\n result.resolvedApiItem = apiItem;\n }\n\n return result;\n } else {\n // NOTE: The \"instanceof DeclarationReference\" test assumes a specific version of the @microsoft/tsdoc package.\n throw new Error(\n 'The \"declarationReference\" parameter must be an instance of' +\n ' DocDeclarationReference or DeclarationReference'\n );\n }\n }\n\n private _initApiItemsRecursive(apiItem: ApiItem, apiItemsByCanonicalReference: Map<string, ApiItem>): void {\n if (apiItem.canonicalReference && !apiItem.canonicalReference.isEmpty) {\n apiItemsByCanonicalReference.set(apiItem.canonicalReference.toString(), apiItem);\n }\n\n // Recurse container members\n if (ApiItemContainerMixin.isBaseClassOf(apiItem)) {\n for (const apiMember of apiItem.members) {\n this._initApiItemsRecursive(apiMember, apiItemsByCanonicalReference);\n }\n }\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n return DeclarationReference.empty();\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiNamespace.d.ts","sourceRoot":"","sources":["../../src/model/ApiNamespace.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,KAAK,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAC5G,OAAO,EAAE,KAAK,uBAAuB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,KAAK,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAAE,KAAK,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,KAAK,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE7F;;;GAGG;AACH,MAAM,WAAW,oBACf,SAAQ,6BAA6B,EACnC,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB;CAAG;;AAE/B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,YAAa,SAAQ,iBAEjC;gBACoB,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;CAOvD"}
1
+ {"version":3,"file":"ApiNamespace.d.ts","sourceRoot":"","sources":["../../src/model/ApiNamespace.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,KAAK,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAC5G,OAAO,EAAE,KAAK,uBAAuB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,KAAK,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAAE,KAAK,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,KAAK,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE7F;;;GAGG;AACH,MAAM,WAAW,oBACf,SAAQ,6BAA6B,EACnC,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB;CAAG;;AAE/B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,YAAa,SAAQ,iBAEjC;gBACoB,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;CAOvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiNamespace.js","sourceRoot":"","sources":["../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soft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n type Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport { ApiItemKind } from '../items/ApiItem';\nimport { ApiItemContainerMixin, type IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\nimport { type IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { type IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiClass}.\n * @public\n */\nexport interface IApiNamespaceOptions\n extends IApiItemContainerMixinOptions,\n IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiExportedMixinOptions {}\n\n/**\n * Represents a TypeScript namespace declaration.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiNamespace` represents a TypeScript declaration such `X` or `Y` in this example:\n *\n * ```ts\n * export namespace X {\n * export namespace Y {\n * export interface IWidget {\n * render(): void;\n * }\n * }\n * }\n * ```\n *\n * @public\n */\nexport class ApiNamespace extends ApiItemContainerMixin(\n ApiNameMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem)))\n) {\n public constructor(options: IApiNamespaceOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.Namespace}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Namespace;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiNamespace.getContainerKey(this.name);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n const navigation: Navigation = this.isExported ? Navigation.Exports : Navigation.Locals;\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(navigation, nameComponent)\n .withMeaning(Meaning.Namespace);\n }\n}\n"]}
1
+ {"version":3,"file":"ApiNamespace.js","sourceRoot":"","sources":["../../src/model/ApiNamespace.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AAEjE,8CAA+C;AAC/C,2EAA4G;AAC5G,8DAAyF;AACzF,qEAAmG;AACnG,yDAAiF;AACjF,iEAA6F;AAa7F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,YAAa,SAAQ,IAAA,6CAAqB,EACrD,IAAA,2BAAY,EAAC,IAAA,uCAAkB,EAAC,IAAA,mCAAgB,EAAC,iCAAe,CAAC,CAAC,CAAC,CACpE;IACC,YAAmB,OAA6B;QAC9C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,SAAS,EAAE,CAAC;IAC5C,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,SAAS,CAAC;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,MAAM,UAAU,GAAe,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,iCAAU,CAAC,OAAO,CAAC,CAAC,CAAC,iCAAU,CAAC,MAAM,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,CAAC,8BAAO,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;CACF;AA7BD,oCA6BC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n type Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\n\nimport { ApiItemKind } from '../items/ApiItem';\nimport { ApiItemContainerMixin, type IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\nimport { type IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { type IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiClass}.\n * @public\n */\nexport interface IApiNamespaceOptions\n extends IApiItemContainerMixinOptions,\n IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiExportedMixinOptions {}\n\n/**\n * Represents a TypeScript namespace declaration.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiNamespace` represents a TypeScript declaration such `X` or `Y` in this example:\n *\n * ```ts\n * export namespace X {\n * export namespace Y {\n * export interface IWidget {\n * render(): void;\n * }\n * }\n * }\n * ```\n *\n * @public\n */\nexport class ApiNamespace extends ApiItemContainerMixin(\n ApiNameMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem)))\n) {\n public constructor(options: IApiNamespaceOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.Namespace}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Namespace;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiNamespace.getContainerKey(this.name);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n const navigation: Navigation = this.isExported ? Navigation.Exports : Navigation.Locals;\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(navigation, nameComponent)\n .withMeaning(Meaning.Namespace);\n }\n}\n"]}
@@ -1,12 +1,12 @@
1
1
  import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
2
+ import { type IJsonFileSaveOptions, type JsonObject } from '@rushstack/node-core-library';
3
+ import { TSDocConfiguration } from '@microsoft/tsdoc';
2
4
  import { ApiItemKind, type IApiItemJson } from '../items/ApiItem';
3
5
  import { ApiItemContainerMixin, type IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';
4
- import { type IJsonFileSaveOptions, type JsonObject } from '@rushstack/node-core-library';
5
6
  import { ApiDocumentedItem, type IApiDocumentedItemOptions } from '../items/ApiDocumentedItem';
6
7
  import type { ApiEntryPoint } from './ApiEntryPoint';
7
8
  import { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
8
9
  import { DeserializerContext, ApiJsonSchemaVersion } from './DeserializerContext';
9
- import { TSDocConfiguration } from '@microsoft/tsdoc';
10
10
  /**
11
11
  * Constructor options for {@link ApiPackage}.
12
12
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"ApiPackage.d.ts","sourceRoot":"","sources":["../../src/model/ApiPackage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yDAAyD,CAAC;AAC/F,OAAO,EAAW,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,KAAK,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAC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OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAS;gBAEzB,OAAO,EAAE,kBAAkB;IAO9C,gBAAgB;WACF,iBAAiB,CAC7B,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,EACpC,OAAO,EAAE,mBAAmB,EAC5B,UAAU,EAAE,eAAe,GAC1B,IAAI;WAMO,gBAAgB,CAAC,eAAe,EAAE,MAAM,GAAG,UAAU;IAwEnE,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;;;;;;;OAOG;IACH,IAAW,kBAAkB,IAAI,kBAAkB,CAElD;IAED,IAAW,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAEhD;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;IA8BtF,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAGvD"}
@@ -4,14 +4,14 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.ApiPackage = void 0;
6
6
  const DeclarationReference_1 = require("@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference");
7
+ const node_core_library_1 = require("@rushstack/node-core-library");
8
+ const tsdoc_1 = require("@microsoft/tsdoc");
9
+ const tsdoc_config_1 = require("@microsoft/tsdoc-config");
7
10
  const ApiItem_1 = require("../items/ApiItem");
8
11
  const ApiItemContainerMixin_1 = require("../mixins/ApiItemContainerMixin");
9
- const node_core_library_1 = require("@rushstack/node-core-library");
10
12
  const ApiDocumentedItem_1 = require("../items/ApiDocumentedItem");
11
13
  const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
12
14
  const DeserializerContext_1 = require("./DeserializerContext");
13
- const tsdoc_1 = require("@microsoft/tsdoc");
14
- const tsdoc_config_1 = require("@microsoft/tsdoc-config");
15
15
  /**
16
16
  * Represents an NPM package containing API declarations.
17
17
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ApiPackage.js","sourceRoot":"","sources":["../../src/model/ApiPackage.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAA+F;AAC/F,8CAA2E;AAC3E,2EAA4G;AAC5G,oEAMsC;AACtC,kEAA+F;AAE/F,yDAAiF;AACjF,+DAAkF;AAClF,4CAAsD;AACtD,0DAA0D;AAsG1D;;;;;;;;;GASG;AACH,MAAa,UAAW,SAAQ,IAAA,6CAAqB,EAAC,IAAA,2BAAY,EAAC,qCAAiB,CAAC,CAAC;IAIpF,YAAmB,OAA2B;QAC5C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC;QACtD,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IACpD,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,iBAAiB,CAC7B,OAAoC,EACpC,OAA4B,EAC5B,UAA2B;QAE3B,KAAK,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAEtD,OAAO,CAAC,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,CAAC;IACzD,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,CAAC;YACjG,MAAM,IAAI,KAAK,CACb,iBAAiB,eAAe,GAA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CAAC,iBAAiB,CAAC,UAAU,CAAiC,CAAC;IAC5E,CAAC;IAEM,cAAc,CAAC,eAAuB,EAAE,OAAgC;QAC7E,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QAED,MAAM,WAAW,GAAiB,qCAAiB,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAElF,MAAM,eAAe,GAAoB,8BAAe,CAAC,cAAc,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACjG,MAAM,WAAW,GAAe,eAAe,CAAC,YAAY,EAAE,CAAC;QAE/D,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;gBAChF,WAAW;aACZ;SACiB,CAAC;QAErB,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,UAAU,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACtD,CAAC;QAED,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;AA3KD,gCA2KC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport { ApiItem, ApiItemKind, type IApiItemJson } from '../items/ApiItem';\nimport { ApiItemContainerMixin, type IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\nimport {\n JsonFile,\n type IJsonFileSaveOptions,\n PackageJsonLookup,\n type IPackageJson,\n type JsonObject\n} from '@rushstack/node-core-library';\nimport { ApiDocumentedItem, type IApiDocumentedItemOptions } from '../items/ApiDocumentedItem';\nimport type { ApiEntryPoint } from './ApiEntryPoint';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { DeserializerContext, ApiJsonSchemaVersion } from './DeserializerContext';\nimport { TSDocConfiguration } from '@microsoft/tsdoc';\nimport { TSDocConfigFile } from '@microsoft/tsdoc-config';\n\n/**\n * Constructor options for {@link ApiPackage}.\n * @public\n */\nexport interface IApiPackageOptions\n extends IApiItemContainerMixinOptions,\n IApiNameMixinOptions,\n IApiDocumentedItemOptions {\n tsdocConfiguration: TSDocConfiguration;\n projectFolderUrl?: string;\n}\n\nexport interface IApiPackageMetadataJson {\n /**\n * The NPM package name for the tool that wrote the *.api.json file.\n * For informational purposes only.\n */\n toolPackage: string;\n\n /**\n * The NPM package version for the tool that wrote the *.api.json file.\n * For informational purposes only.\n */\n toolVersion: string;\n\n /**\n * The schema version for the .api.json file format. Used for determining whether the file format is\n * supported, and for backwards compatibility.\n */\n schemaVersion: ApiJsonSchemaVersion;\n\n /**\n * To support forwards compatibility, the `oldestForwardsCompatibleVersion` field tracks the oldest schema version\n * whose corresponding deserializer could safely load this file.\n *\n * @remarks\n * Normally api-extractor-model should refuse to load a schema version that is newer than the latest version\n * that its deserializer understands. However, sometimes a schema change may merely introduce some new fields\n * without modifying or removing any existing fields. In this case, an older api-extractor-model library can\n * safely deserialize the newer version (by ignoring the extra fields that it doesn't recognize). The newer\n * serializer can use this field to communicate that.\n *\n * If present, the `oldestForwardsCompatibleVersion` must be less than or equal to\n * `IApiPackageMetadataJson.schemaVersion`.\n */\n oldestForwardsCompatibleVersion?: ApiJsonSchemaVersion;\n\n /**\n * The TSDoc configuration that was used when analyzing the API for this package.\n *\n * @remarks\n *\n * The structure of this objet is defined by the `@microsoft/tsdoc-config` library.\n * Normally this configuration is loaded from the project's tsdoc.json file. It is stored\n * in the .api.json file so that doc comments can be parsed accurately when loading the file.\n */\n tsdocConfig: JsonObject;\n}\n\nexport interface IApiPackageJson extends IApiItemJson {\n /**\n * A file header that stores metadata about the tool that wrote the *.api.json file.\n */\n metadata: IApiPackageMetadataJson;\n\n /**\n * The base URL where the project's source code can be viewed on a website such as GitHub or\n * Azure DevOps. This URL path corresponds to the `<projectFolder>` path on disk. Provided via the\n * `api-extractor.json` config.\n */\n projectFolderUrl?: string;\n}\n\n/**\n * Options for {@link ApiPackage.saveToJsonFile}.\n * @public\n */\nexport interface IApiPackageSaveOptions extends IJsonFileSaveOptions {\n /**\n * Optionally specifies a value for the \"toolPackage\" field in the output .api.json data file;\n * otherwise, the value will be \"api-extractor-model\".\n */\n toolPackage?: string;\n\n /**\n * Optionally specifies a value for the \"toolVersion\" field in the output .api.json data file;\n * otherwise, the value will be the current version of the api-extractor-model package.\n */\n toolVersion?: string;\n\n /**\n * Set to true only when invoking API Extractor's test harness.\n *\n * @remarks\n * When `testMode` is true, the `toolVersion` field in the .api.json file is assigned an empty string\n * to prevent spurious diffs in output files tracked for tests.\n */\n testMode?: boolean;\n}\n\n/**\n * Represents an NPM package containing API declarations.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * @public\n */\nexport class ApiPackage extends ApiItemContainerMixin(ApiNameMixin(ApiDocumentedItem)) {\n private readonly _tsdocConfiguration: TSDocConfiguration;\n private readonly _projectFolderUrl?: string;\n\n public constructor(options: IApiPackageOptions) {\n super(options);\n\n this._tsdocConfiguration = options.tsdocConfiguration;\n this._projectFolderUrl = options.projectFolderUrl;\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiPackageOptions>,\n context: DeserializerContext,\n jsonObject: IApiPackageJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.projectFolderUrl = jsonObject.projectFolderUrl;\n }\n\n public static loadFromJsonFile(apiJsonFilename: string): ApiPackage {\n const jsonObject: IApiPackageJson = JsonFile.load(apiJsonFilename);\n\n if (!jsonObject || !jsonObject.metadata || typeof jsonObject.metadata.schemaVersion !== 'number') {\n throw new Error(\n `Error loading ${apiJsonFilename}:` +\n `\\nThe file format is not recognized; the \"metadata.schemaVersion\" field is missing or invalid`\n );\n }\n\n const schemaVersion: number = jsonObject.metadata.schemaVersion;\n\n if (schemaVersion < ApiJsonSchemaVersion.OLDEST_SUPPORTED) {\n throw new Error(\n `Error loading ${apiJsonFilename}:` +\n `\\nThe file format is version ${schemaVersion},` +\n ` whereas ${ApiJsonSchemaVersion.OLDEST_SUPPORTED} is the oldest version supported by this tool`\n );\n }\n\n let oldestForwardsCompatibleVersion: number = schemaVersion;\n if (jsonObject.metadata.oldestForwardsCompatibleVersion) {\n // Sanity check\n if (jsonObject.metadata.oldestForwardsCompatibleVersion > schemaVersion) {\n throw new Error(\n `Error loading ${apiJsonFilename}:` +\n `\\nInvalid file format; \"oldestForwardsCompatibleVersion\" cannot be newer than \"schemaVersion\"`\n );\n }\n oldestForwardsCompatibleVersion = jsonObject.metadata.oldestForwardsCompatibleVersion;\n }\n\n let versionToDeserialize: number = schemaVersion;\n if (versionToDeserialize > ApiJsonSchemaVersion.LATEST) {\n // If the file format is too new, can we treat it as some earlier compatible version\n // as indicated by oldestForwardsCompatibleVersion?\n versionToDeserialize = Math.max(oldestForwardsCompatibleVersion, ApiJsonSchemaVersion.LATEST);\n\n if (versionToDeserialize > ApiJsonSchemaVersion.LATEST) {\n // Nope, still too new\n throw new Error(\n `Error loading ${apiJsonFilename}:` +\n `\\nThe file format version ${schemaVersion} was written by a newer release of` +\n ` the api-extractor-model library; you may need to upgrade your software`\n );\n }\n }\n\n const tsdocConfiguration: TSDocConfiguration = new TSDocConfiguration();\n\n if (versionToDeserialize >= ApiJsonSchemaVersion.V_1004) {\n const tsdocConfigFile: TSDocConfigFile = TSDocConfigFile.loadFromObject(\n jsonObject.metadata.tsdocConfig\n );\n if (tsdocConfigFile.hasErrors) {\n throw new Error(`Error loading ${apiJsonFilename}:\\n` + tsdocConfigFile.getErrorSummary());\n }\n\n tsdocConfigFile.configureParser(tsdocConfiguration);\n }\n\n const context: DeserializerContext = new DeserializerContext({\n apiJsonFilename,\n toolPackage: jsonObject.metadata.toolPackage,\n toolVersion: jsonObject.metadata.toolVersion,\n versionToDeserialize: versionToDeserialize,\n tsdocConfiguration\n });\n\n return ApiItem.deserialize(jsonObject, context) as ApiPackage;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Package;\n }\n\n /** @override */\n public get containerKey(): string {\n // No prefix needed, because ApiPackage is the only possible member of an ApiModel\n return this.name;\n }\n\n public get entryPoints(): ReadonlyArray<ApiEntryPoint> {\n return this.members as ReadonlyArray<ApiEntryPoint>;\n }\n\n /**\n * The TSDoc configuration that was used when analyzing the API for this package.\n *\n * @remarks\n *\n * Normally this configuration is loaded from the project's tsdoc.json file. It is stored\n * in the .api.json file so that doc comments can be parsed accurately when loading the file.\n */\n public get tsdocConfiguration(): TSDocConfiguration {\n return this._tsdocConfiguration;\n }\n\n public get projectFolderUrl(): string | undefined {\n return this._projectFolderUrl;\n }\n\n /** @override */\n public addMember(member: ApiEntryPoint): void {\n if (member.kind !== ApiItemKind.EntryPoint) {\n throw new Error('Only items of type ApiEntryPoint may be added to an ApiPackage');\n }\n super.addMember(member);\n }\n\n public findEntryPointsByPath(importPath: string): ReadonlyArray<ApiEntryPoint> {\n return this.findMembersByName(importPath) as ReadonlyArray<ApiEntryPoint>;\n }\n\n public saveToJsonFile(apiJsonFilename: string, options?: IApiPackageSaveOptions): void {\n if (!options) {\n options = {};\n }\n\n const packageJson: IPackageJson = PackageJsonLookup.loadOwnPackageJson(__dirname);\n\n const tsdocConfigFile: TSDocConfigFile = TSDocConfigFile.loadFromParser(this.tsdocConfiguration);\n const tsdocConfig: JsonObject = tsdocConfigFile.saveToObject();\n\n const jsonObject: IApiPackageJson = {\n metadata: {\n toolPackage: options.toolPackage || packageJson.name,\n // In test mode, we don't write the real version, since that would cause spurious diffs whenever\n // the version is bumped. Instead we write a placeholder string.\n toolVersion: options.testMode ? '[test mode]' : options.toolVersion || packageJson.version,\n schemaVersion: ApiJsonSchemaVersion.LATEST,\n oldestForwardsCompatibleVersion: ApiJsonSchemaVersion.OLDEST_FORWARDS_COMPATIBLE,\n tsdocConfig\n }\n } as IApiPackageJson;\n\n if (this.projectFolderUrl) {\n jsonObject.projectFolderUrl = this.projectFolderUrl;\n }\n\n this.serializeInto(jsonObject);\n JsonFile.save(jsonObject, apiJsonFilename, options);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n return DeclarationReference.package(this.name);\n }\n}\n"]}
1
+ {"version":3,"file":"ApiPackage.js","sourceRoot":"","sources":["../../src/model/ApiPackage.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAA+F;AAC/F,oEAMsC;AACtC,4CAAsD;AACtD,0DAA0D;AAE1D,8CAA2E;AAC3E,2EAA4G;AAC5G,kEAA+F;AAE/F,yDAAiF;AACjF,+DAAkF;AAsGlF;;;;;;;;;GASG;AACH,MAAa,UAAW,SAAQ,IAAA,6CAAqB,EAAC,IAAA,2BAAY,EAAC,qCAAiB,CAAC,CAAC;IAIpF,YAAmB,OAA2B;QAC5C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC;QACtD,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IACpD,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,iBAAiB,CAC7B,OAAoC,EACpC,OAA4B,EAC5B,UAA2B;Q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B,UAAU,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACtD,CAAC;QAED,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;AA3KD,gCA2KC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport {\n JsonFile,\n type IJsonFileSaveOptions,\n PackageJsonLookup,\n type IPackageJson,\n type JsonObject\n} from '@rushstack/node-core-library';\nimport { TSDocConfiguration } from '@microsoft/tsdoc';\nimport { TSDocConfigFile } from '@microsoft/tsdoc-config';\n\nimport { ApiItem, ApiItemKind, type IApiItemJson } from '../items/ApiItem';\nimport { ApiItemContainerMixin, type IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\nimport { ApiDocumentedItem, type IApiDocumentedItemOptions } from '../items/ApiDocumentedItem';\nimport type { ApiEntryPoint } from './ApiEntryPoint';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { DeserializerContext, ApiJsonSchemaVersion } from './DeserializerContext';\n\n/**\n * Constructor options for {@link ApiPackage}.\n * @public\n */\nexport interface IApiPackageOptions\n extends IApiItemContainerMixinOptions,\n IApiNameMixinOptions,\n IApiDocumentedItemOptions {\n tsdocConfiguration: TSDocConfiguration;\n projectFolderUrl?: string;\n}\n\nexport interface IApiPackageMetadataJson {\n /**\n * The NPM package name for the tool that wrote the *.api.json file.\n * For informational purposes only.\n */\n toolPackage: string;\n\n /**\n * The NPM package version for the tool that wrote the *.api.json file.\n * For informational purposes only.\n */\n toolVersion: string;\n\n /**\n * The schema version for the .api.json file format. Used for determining whether the file format is\n * supported, and for backwards compatibility.\n */\n schemaVersion: ApiJsonSchemaVersion;\n\n /**\n * To support forwards compatibility, the `oldestForwardsCompatibleVersion` field tracks the oldest schema version\n * whose corresponding deserializer could safely load this file.\n *\n * @remarks\n * Normally api-extractor-model should refuse to load a schema version that is newer than the latest version\n * that its deserializer understands. However, sometimes a schema change may merely introduce some new fields\n * without modifying or removing any existing fields. In this case, an older api-extractor-model library can\n * safely deserialize the newer version (by ignoring the extra fields that it doesn't recognize). The newer\n * serializer can use this field to communicate that.\n *\n * If present, the `oldestForwardsCompatibleVersion` must be less than or equal to\n * `IApiPackageMetadataJson.schemaVersion`.\n */\n oldestForwardsCompatibleVersion?: ApiJsonSchemaVersion;\n\n /**\n * The TSDoc configuration that was used when analyzing the API for this package.\n *\n * @remarks\n *\n * The structure of this objet is defined by the `@microsoft/tsdoc-config` library.\n * Normally this configuration is loaded from the project's tsdoc.json file. It is stored\n * in the .api.json file so that doc comments can be parsed accurately when loading the file.\n */\n tsdocConfig: JsonObject;\n}\n\nexport interface IApiPackageJson extends IApiItemJson {\n /**\n * A file header that stores metadata about the tool that wrote the *.api.json file.\n */\n metadata: IApiPackageMetadataJson;\n\n /**\n * The base URL where the project's source code can be viewed on a website such as GitHub or\n * Azure DevOps. This URL path corresponds to the `<projectFolder>` path on disk. Provided via the\n * `api-extractor.json` config.\n */\n projectFolderUrl?: string;\n}\n\n/**\n * Options for {@link ApiPackage.saveToJsonFile}.\n * @public\n */\nexport interface IApiPackageSaveOptions extends IJsonFileSaveOptions {\n /**\n * Optionally specifies a value for the \"toolPackage\" field in the output .api.json data file;\n * otherwise, the value will be \"api-extractor-model\".\n */\n toolPackage?: string;\n\n /**\n * Optionally specifies a value for the \"toolVersion\" field in the output .api.json data file;\n * otherwise, the value will be the current version of the api-extractor-model package.\n */\n toolVersion?: string;\n\n /**\n * Set to true only when invoking API Extractor's test harness.\n *\n * @remarks\n * When `testMode` is true, the `toolVersion` field in the .api.json file is assigned an empty string\n * to prevent spurious diffs in output files tracked for tests.\n */\n testMode?: boolean;\n}\n\n/**\n * Represents an NPM package containing API declarations.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * @public\n */\nexport class ApiPackage extends ApiItemContainerMixin(ApiNameMixin(ApiDocumentedItem)) {\n private readonly _tsdocConfiguration: TSDocConfiguration;\n private readonly _projectFolderUrl?: string;\n\n public constructor(options: IApiPackageOptions) {\n super(options);\n\n this._tsdocConfiguration = options.tsdocConfiguration;\n this._projectFolderUrl = options.projectFolderUrl;\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiPackageOptions>,\n context: DeserializerContext,\n jsonObject: IApiPackageJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.projectFolderUrl = jsonObject.projectFolderUrl;\n }\n\n public static loadFromJsonFile(apiJsonFilename: string): ApiPackage {\n const jsonObject: IApiPackageJson = JsonFile.load(apiJsonFilename);\n\n if (!jsonObject || !jsonObject.metadata || typeof jsonObject.metadata.schemaVersion !== 'number') {\n throw new Error(\n `Error loading ${apiJsonFilename}:` +\n `\\nThe file format is not recognized; the \"metadata.schemaVersion\" field is missing or invalid`\n );\n }\n\n const schemaVersion: number = jsonObject.metadata.schemaVersion;\n\n if (schemaVersion < ApiJsonSchemaVersion.OLDEST_SUPPORTED) {\n throw new Error(\n `Error loading ${apiJsonFilename}:` +\n `\\nThe file format is version ${schemaVersion},` +\n ` whereas ${ApiJsonSchemaVersion.OLDEST_SUPPORTED} is the oldest version supported by this tool`\n );\n }\n\n let oldestForwardsCompatibleVersion: number = schemaVersion;\n if (jsonObject.metadata.oldestForwardsCompatibleVersion) {\n // Sanity check\n if (jsonObject.metadata.oldestForwardsCompatibleVersion > schemaVersion) {\n throw new Error(\n `Error loading ${apiJsonFilename}:` +\n `\\nInvalid file format; \"oldestForwardsCompatibleVersion\" cannot be newer than \"schemaVersion\"`\n );\n }\n oldestForwardsCompatibleVersion = jsonObject.metadata.oldestForwardsCompatibleVersion;\n }\n\n let versionToDeserialize: number = schemaVersion;\n if (versionToDeserialize > ApiJsonSchemaVersion.LATEST) {\n // If the file format is too new, can we treat it as some earlier compatible version\n // as indicated by oldestForwardsCompatibleVersion?\n versionToDeserialize = Math.max(oldestForwardsCompatibleVersion, ApiJsonSchemaVersion.LATEST);\n\n if (versionToDeserialize > ApiJsonSchemaVersion.LATEST) {\n // Nope, still too new\n throw new Error(\n `Error loading ${apiJsonFilename}:` +\n `\\nThe file format version ${schemaVersion} was written by a newer release of` +\n ` the api-extractor-model library; you may need to upgrade your software`\n );\n }\n }\n\n const tsdocConfiguration: TSDocConfiguration = new TSDocConfiguration();\n\n if (versionToDeserialize >= ApiJsonSchemaVersion.V_1004) {\n const tsdocConfigFile: TSDocConfigFile = TSDocConfigFile.loadFromObject(\n jsonObject.metadata.tsdocConfig\n );\n if (tsdocConfigFile.hasErrors) {\n throw new Error(`Error loading ${apiJsonFilename}:\\n` + tsdocConfigFile.getErrorSummary());\n }\n\n tsdocConfigFile.configureParser(tsdocConfiguration);\n }\n\n const context: DeserializerContext = new DeserializerContext({\n apiJsonFilename,\n toolPackage: jsonObject.metadata.toolPackage,\n toolVersion: jsonObject.metadata.toolVersion,\n versionToDeserialize: versionToDeserialize,\n tsdocConfiguration\n });\n\n return ApiItem.deserialize(jsonObject, context) as ApiPackage;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Package;\n }\n\n /** @override */\n public get containerKey(): string {\n // No prefix needed, because ApiPackage is the only possible member of an ApiModel\n return this.name;\n }\n\n public get entryPoints(): ReadonlyArray<ApiEntryPoint> {\n return this.members as ReadonlyArray<ApiEntryPoint>;\n }\n\n /**\n * The TSDoc configuration that was used when analyzing the API for this package.\n *\n * @remarks\n *\n * Normally this configuration is loaded from the project's tsdoc.json file. It is stored\n * in the .api.json file so that doc comments can be parsed accurately when loading the file.\n */\n public get tsdocConfiguration(): TSDocConfiguration {\n return this._tsdocConfiguration;\n }\n\n public get projectFolderUrl(): string | undefined {\n return this._projectFolderUrl;\n }\n\n /** @override */\n public addMember(member: ApiEntryPoint): void {\n if (member.kind !== ApiItemKind.EntryPoint) {\n throw new Error('Only items of type ApiEntryPoint may be added to an ApiPackage');\n }\n super.addMember(member);\n }\n\n public findEntryPointsByPath(importPath: string): ReadonlyArray<ApiEntryPoint> {\n return this.findMembersByName(importPath) as ReadonlyArray<ApiEntryPoint>;\n }\n\n public saveToJsonFile(apiJsonFilename: string, options?: IApiPackageSaveOptions): void {\n if (!options) {\n options = {};\n }\n\n const packageJson: IPackageJson = PackageJsonLookup.loadOwnPackageJson(__dirname);\n\n const tsdocConfigFile: TSDocConfigFile = TSDocConfigFile.loadFromParser(this.tsdocConfiguration);\n const tsdocConfig: JsonObject = tsdocConfigFile.saveToObject();\n\n const jsonObject: IApiPackageJson = {\n metadata: {\n toolPackage: options.toolPackage || packageJson.name,\n // In test mode, we don't write the real version, since that would cause spurious diffs whenever\n // the version is bumped. Instead we write a placeholder string.\n toolVersion: options.testMode ? '[test mode]' : options.toolVersion || packageJson.version,\n schemaVersion: ApiJsonSchemaVersion.LATEST,\n oldestForwardsCompatibleVersion: ApiJsonSchemaVersion.OLDEST_FORWARDS_COMPATIBLE,\n tsdocConfig\n }\n } as IApiPackageJson;\n\n if (this.projectFolderUrl) {\n jsonObject.projectFolderUrl = this.projectFolderUrl;\n }\n\n this.serializeInto(jsonObject);\n JsonFile.save(jsonObject, apiJsonFilename, options);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n return DeclarationReference.package(this.name);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiProperty.d.ts","sourceRoot":"","sources":["../../src/model/ApiProperty.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CA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CAAC;QAClD,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,QAAQ,WAAW,CAAC;QACpD,CAAC;IACH,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,QAAQ,CAAC;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,CAAC,iCAAU,CAAC,OAAO,CAAC,CAAC,CAAC,iCAAU,CAAC,OAAO,EAAE,aAAa,CAAC;aACzF,WAAW,CAAC,8BAAO,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;CACF;AAhCD,kCAgCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n type Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport { ApiItemKind } from '../items/ApiItem';\nimport { ApiAbstractMixin, type IApiAbstractMixinOptions } from '../mixins/ApiAbstractMixin';\nimport { ApiProtectedMixin, type IApiProtectedMixinOptions } from '../mixins/ApiProtectedMixin';\nimport { ApiStaticMixin, type IApiStaticMixinOptions } from '../mixins/ApiStaticMixin';\nimport { ApiInitializerMixin, type IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin';\nimport { ApiPropertyItem, type IApiPropertyItemOptions } from '../items/ApiPropertyItem';\n\n/**\n * Constructor options for {@link ApiProperty}.\n * @public\n */\nexport interface IApiPropertyOptions\n extends IApiPropertyItemOptions,\n IApiAbstractMixinOptions,\n IApiProtectedMixinOptions,\n IApiStaticMixinOptions,\n IApiInitializerMixinOptions {}\n\n/**\n * Represents a TypeScript property declaration that belongs to an `ApiClass`.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiProperty` represents a TypeScript declaration such as the `width` and `height` members in this example:\n *\n * ```ts\n * export class Widget {\n * public width: number = 100;\n *\n * public get height(): number {\n * if (this.isSquashed()) {\n * return 0;\n * } else {\n * return this.clientArea.height;\n * }\n * }\n * }\n * ```\n *\n * Note that member variables are also considered to be properties.\n *\n * If the property has both a getter function and setter function, they will be represented by a single `ApiProperty`\n * and must have a single documentation comment.\n *\n * Compare with {@link ApiPropertySignature}, which represents a property belonging to an interface.\n * For example, a class property can be `static` but an interface property cannot.\n *\n * @public\n */\nexport class ApiProperty extends ApiAbstractMixin(\n ApiProtectedMixin(ApiStaticMixin(ApiInitializerMixin(ApiPropertyItem)))\n) {\n public constructor(options: IApiPropertyOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string, isStatic: boolean): string {\n if (isStatic) {\n return `${name}|${ApiItemKind.Property}|static`;\n } else {\n return `${name}|${ApiItemKind.Property}|instance`;\n }\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Property;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiProperty.getContainerKey(this.name, this.isStatic);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(this.isStatic ? Navigation.Exports : Navigation.Members, nameComponent)\n .withMeaning(Meaning.Member);\n }\n}\n"]}
1
+ {"version":3,"file":"ApiProperty.js","sourceRo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AAC,CAAC,CAAC,iCAAU,CAAC,OAAO,EAAE,aAAa,CAAC;aACzF,WAAW,CAAC,8BAAO,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;CACF;AAhCD,kCAgCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n type Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\n\nimport { ApiItemKind } from '../items/ApiItem';\nimport { ApiAbstractMixin, type IApiAbstractMixinOptions } from '../mixins/ApiAbstractMixin';\nimport { ApiProtectedMixin, type IApiProtectedMixinOptions } from '../mixins/ApiProtectedMixin';\nimport { ApiStaticMixin, type IApiStaticMixinOptions } from '../mixins/ApiStaticMixin';\nimport { ApiInitializerMixin, type IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin';\nimport { ApiPropertyItem, type IApiPropertyItemOptions } from '../items/ApiPropertyItem';\n\n/**\n * Constructor options for {@link ApiProperty}.\n * @public\n */\nexport interface IApiPropertyOptions\n extends IApiPropertyItemOptions,\n IApiAbstractMixinOptions,\n IApiProtectedMixinOptions,\n IApiStaticMixinOptions,\n IApiInitializerMixinOptions {}\n\n/**\n * Represents a TypeScript property declaration that belongs to an `ApiClass`.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiProperty` represents a TypeScript declaration such as the `width` and `height` members in this example:\n *\n * ```ts\n * export class Widget {\n * public width: number = 100;\n *\n * public get height(): number {\n * if (this.isSquashed()) {\n * return 0;\n * } else {\n * return this.clientArea.height;\n * }\n * }\n * }\n * ```\n *\n * Note that member variables are also considered to be properties.\n *\n * If the property has both a getter function and setter function, they will be represented by a single `ApiProperty`\n * and must have a single documentation comment.\n *\n * Compare with {@link ApiPropertySignature}, which represents a property belonging to an interface.\n * For example, a class property can be `static` but an interface property cannot.\n *\n * @public\n */\nexport class ApiProperty extends ApiAbstractMixin(\n ApiProtectedMixin(ApiStaticMixin(ApiInitializerMixin(ApiPropertyItem)))\n) {\n public constructor(options: IApiPropertyOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string, isStatic: boolean): string {\n if (isStatic) {\n return `${name}|${ApiItemKind.Property}|static`;\n } else {\n return `${name}|${ApiItemKind.Property}|instance`;\n }\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Property;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiProperty.getContainerKey(this.name, this.isStatic);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(this.isStatic ? Navigation.Exports : Navigation.Members, nameComponent)\n .withMeaning(Meaning.Member);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiPropertySignature.d.ts","sourceRoot":"","sources":["../../src/model/ApiPropertySignature.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,KAAK,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEzF;;;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"}
1
+ {"version":3,"file":"ApiPropertySignature.d.ts","sourceRoot":"","sources":["../../src/model/ApiPropertySignature.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,KAAK,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEzF;;;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"}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiPropertySignature.js","sourceRoot":"","sources":["../../src/model/ApiPropertySignature.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,8DAAyF;AAQzF;;;;;;;;;;;;;;;;;;;;;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,qBAAW,CAAC,iBAAiB,EAAE,CAAC;IACpD,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,iBAAiB,CAAC;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,CAAC,iCAAU,CAAC,OAAO,EAAE,aAAa,CAAC;aACpD,WAAW,CAAC,8BAAO,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;CACF;AA1BD,oDA0BC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n type Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport { ApiItemKind } from '../items/ApiItem';\nimport { ApiPropertyItem, type IApiPropertyItemOptions } from '../items/ApiPropertyItem';\n\n/**\n * Constructor options for {@link ApiPropertySignature}.\n * @public\n */\nexport interface IApiPropertySignatureOptions extends IApiPropertyItemOptions {}\n\n/**\n * Represents a TypeScript property declaration that belongs to an `ApiInterface`.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiPropertySignature` represents a TypeScript declaration such as the `width` and `height` members in this example:\n *\n * ```ts\n * export interface IWidget {\n * readonly width: number;\n * height: number;\n * }\n * ```\n *\n * Compare with {@link ApiProperty}, which represents a property belonging to a class.\n * For example, a class property can be `static` but an interface property cannot.\n *\n * @public\n */\nexport class ApiPropertySignature extends ApiPropertyItem {\n public constructor(options: IApiPropertySignatureOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.PropertySignature}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.PropertySignature;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiPropertySignature.getContainerKey(this.name);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(Navigation.Members, nameComponent)\n .withMeaning(Meaning.Member);\n }\n}\n"]}
1
+ {"version":3,"file":"ApiPropertySignature.js","sourceRoot":"","sources":["../../src/model/ApiPropertySignature.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AAEjE,8CAA+C;AAC/C,8DAAyF;AAQzF;;;;;;;;;;;;;;;;;;;;;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,qBAAW,CAAC,iBAAiB,EAAE,CAAC;IACpD,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,iBAAiB,CAAC;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,CAAC,iCAAU,CAAC,OAAO,EAAE,aAAa,CAAC;aACpD,WAAW,CAAC,8BAAO,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;CACF;AA1BD,oDA0BC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n type Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\n\nimport { ApiItemKind } from '../items/ApiItem';\nimport { ApiPropertyItem, type IApiPropertyItemOptions } from '../items/ApiPropertyItem';\n\n/**\n * Constructor options for {@link ApiPropertySignature}.\n * @public\n */\nexport interface IApiPropertySignatureOptions extends IApiPropertyItemOptions {}\n\n/**\n * Represents a TypeScript property declaration that belongs to an `ApiInterface`.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiPropertySignature` represents a TypeScript declaration such as the `width` and `height` members in this example:\n *\n * ```ts\n * export interface IWidget {\n * readonly width: number;\n * height: number;\n * }\n * ```\n *\n * Compare with {@link ApiProperty}, which represents a property belonging to a class.\n * For example, a class property can be `static` but an interface property cannot.\n *\n * @public\n */\nexport class ApiPropertySignature extends ApiPropertyItem {\n public constructor(options: IApiPropertySignatureOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.PropertySignature}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.PropertySignature;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiPropertySignature.getContainerKey(this.name);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(Navigation.Members, nameComponent)\n .withMeaning(Meaning.Member);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiTypeAlias.d.ts","sourceRoot":"","sources":["../../src/model/ApiTypeAlias.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,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C;QAEtD,OAAO,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;IACrD,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,SAAS,EAAE,CAAC;IAC5C,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,gBAAgB;IACT,aAAa,CAAC,UAAsC;QACzD,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAEhC,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;IAC1D,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,MAAM,UAAU,GAAe,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,iCAAU,CAAC,OAAO,CAAC,CAAC,CAAC,iCAAU,CAAC,MAAM,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,CAAC,8BAAO,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;CACF;AA9DD,oCA8DC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n type Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport type { Excerpt, IExcerptTokenRange } from '../mixins/Excerpt';\nimport { ApiItemKind } from '../items/ApiItem';\nimport {\n ApiDeclaredItem,\n type IApiDeclaredItemOptions,\n type IApiDeclaredItemJson\n} from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport {\n ApiTypeParameterListMixin,\n type IApiTypeParameterListMixinOptions,\n type IApiTypeParameterListMixinJson\n} from '../mixins/ApiTypeParameterListMixin';\nimport type { DeserializerContext } from './DeserializerContext';\nimport {\n type IApiExportedMixinJson,\n type IApiExportedMixinOptions,\n ApiExportedMixin\n} from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiTypeAlias}.\n * @public\n */\nexport interface IApiTypeAliasOptions\n extends IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiTypeParameterListMixinOptions,\n IApiExportedMixinOptions {\n typeTokenRange: IExcerptTokenRange;\n}\n\nexport interface IApiTypeAliasJson\n extends IApiDeclaredItemJson,\n IApiTypeParameterListMixinJson,\n IApiExportedMixinJson {\n typeTokenRange: IExcerptTokenRange;\n}\n\n/**\n * Represents a TypeScript type alias declaration.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiTypeAlias` represents a definition such as one of these examples:\n *\n * ```ts\n * // A union type:\n * export type Shape = Square | Triangle | Circle;\n *\n * // A generic type alias:\n * export type BoxedValue<T> = { value: T };\n *\n * export type BoxedArray<T> = { array: T[] };\n *\n * // A conditional type alias:\n * export type Boxed<T> = T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;\n *\n * ```\n *\n * @public\n */\nexport class ApiTypeAlias extends ApiTypeParameterListMixin(\n ApiNameMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem)))\n) {\n /**\n * An {@link Excerpt} that describes the type of the alias.\n *\n * @remarks\n * In the example below, the `typeExcerpt` would correspond to the subexpression\n * `T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;`:\n *\n * ```ts\n * export type Boxed<T> = T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;\n * ```\n */\n public readonly typeExcerpt: Excerpt;\n\n public constructor(options: IApiTypeAliasOptions) {\n super(options);\n\n this.typeExcerpt = this.buildExcerpt(options.typeTokenRange);\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiTypeAliasOptions>,\n context: DeserializerContext,\n jsonObject: IApiTypeAliasJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.typeTokenRange = jsonObject.typeTokenRange;\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.TypeAlias}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.TypeAlias;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiTypeAlias.getContainerKey(this.name);\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiTypeAliasJson>): void {\n super.serializeInto(jsonObject);\n\n jsonObject.typeTokenRange = this.typeExcerpt.tokenRange;\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n const navigation: Navigation = this.isExported ? Navigation.Exports : Navigation.Locals;\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(navigation, nameComponent)\n .withMeaning(Meaning.TypeAlias);\n }\n}\n"]}
1
+ {"version":3,"file":"ApiTypeAlias.js","sourceRoot":"","sources":["../../src/model/ApiTypeAlias.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AAGjE,8CAA+C;AAC/C,8DAIkC;AAClC,qEAAmG;AACnG,yDAAiF;AACjF,mFAI6C;AAE7C,iEAIoC;AAsBpC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAa,YAAa,SAAQ,IAAA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CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,CAAC,8BAAO,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;CACF;AA9DD,oCA8DC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n type Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\n\nimport type { Excerpt, IExcerptTokenRange } from '../mixins/Excerpt';\nimport { ApiItemKind } from '../items/ApiItem';\nimport {\n ApiDeclaredItem,\n type IApiDeclaredItemOptions,\n type IApiDeclaredItemJson\n} from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport {\n ApiTypeParameterListMixin,\n type IApiTypeParameterListMixinOptions,\n type IApiTypeParameterListMixinJson\n} from '../mixins/ApiTypeParameterListMixin';\nimport type { DeserializerContext } from './DeserializerContext';\nimport {\n type IApiExportedMixinJson,\n type IApiExportedMixinOptions,\n ApiExportedMixin\n} from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiTypeAlias}.\n * @public\n */\nexport interface IApiTypeAliasOptions\n extends IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiTypeParameterListMixinOptions,\n IApiExportedMixinOptions {\n typeTokenRange: IExcerptTokenRange;\n}\n\nexport interface IApiTypeAliasJson\n extends IApiDeclaredItemJson,\n IApiTypeParameterListMixinJson,\n IApiExportedMixinJson {\n typeTokenRange: IExcerptTokenRange;\n}\n\n/**\n * Represents a TypeScript type alias declaration.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiTypeAlias` represents a definition such as one of these examples:\n *\n * ```ts\n * // A union type:\n * export type Shape = Square | Triangle | Circle;\n *\n * // A generic type alias:\n * export type BoxedValue<T> = { value: T };\n *\n * export type BoxedArray<T> = { array: T[] };\n *\n * // A conditional type alias:\n * export type Boxed<T> = T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;\n *\n * ```\n *\n * @public\n */\nexport class ApiTypeAlias extends ApiTypeParameterListMixin(\n ApiNameMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem)))\n) {\n /**\n * An {@link Excerpt} that describes the type of the alias.\n *\n * @remarks\n * In the example below, the `typeExcerpt` would correspond to the subexpression\n * `T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;`:\n *\n * ```ts\n * export type Boxed<T> = T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;\n * ```\n */\n public readonly typeExcerpt: Excerpt;\n\n public constructor(options: IApiTypeAliasOptions) {\n super(options);\n\n this.typeExcerpt = this.buildExcerpt(options.typeTokenRange);\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiTypeAliasOptions>,\n context: DeserializerContext,\n jsonObject: IApiTypeAliasJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.typeTokenRange = jsonObject.typeTokenRange;\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.TypeAlias}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.TypeAlias;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiTypeAlias.getContainerKey(this.name);\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiTypeAliasJson>): void {\n super.serializeInto(jsonObject);\n\n jsonObject.typeTokenRange = this.typeExcerpt.tokenRange;\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n const navigation: Navigation = this.isExported ? Navigation.Exports : Navigation.Locals;\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(navigation, nameComponent)\n .withMeaning(Meaning.TypeAlias);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiVariable.d.ts","sourceRoot":"","sources":["../../src/model/ApiVariable.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,eAAe,EACf,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,KAAK,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,KAAK,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC7F,OAAO,EAAE,KAAK,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,KAAK,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACtG,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AAEpC;;;GAGG;AACH,MAAM,WAAW,mBACf,SAAQ,oBAAoB,EAC1B,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACvB,2BAA2B,EAC3B,wBAAwB;IAC1B,sBAAsB,EAAE,kBAAkB,CAAC;CAC5C;AAED,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB,EAAE,qBAAqB;IACnF,sBAAsB,EAAE,kBAAkB,CAAC;CAC5C;;AAED;;;;;;;;;;;;;;;;;;;GAm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iCAAU,CAAC,MAAM,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,CAAC,8BAAO,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;CACF;AAtDD,kCAsDC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n type Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport { ApiItemKind } from '../items/ApiItem';\nimport {\n ApiDeclaredItem,\n type IApiDeclaredItemOptions,\n type IApiDeclaredItemJson\n} from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { ApiReadonlyMixin, type IApiReadonlyMixinOptions } from '../mixins/ApiReadonlyMixin';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { ApiInitializerMixin, type IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin';\nimport type { IExcerptTokenRange, Excerpt } from '../mixins/Excerpt';\nimport type { DeserializerContext } from './DeserializerContext';\nimport {\n type IApiExportedMixinJson,\n type IApiExportedMixinOptions,\n ApiExportedMixin\n} from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiVariable}.\n * @public\n */\nexport interface IApiVariableOptions\n extends IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiReadonlyMixinOptions,\n IApiDeclaredItemOptions,\n IApiInitializerMixinOptions,\n IApiExportedMixinOptions {\n variableTypeTokenRange: IExcerptTokenRange;\n}\n\nexport interface IApiVariableJson extends IApiDeclaredItemJson, IApiExportedMixinJson {\n variableTypeTokenRange: IExcerptTokenRange;\n}\n\n/**\n * Represents a TypeScript variable declaration.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiVariable` represents an exported `const` or `let` object such as these examples:\n *\n * ```ts\n * // A variable declaration\n * export let verboseLogging: boolean;\n *\n * // A constant variable declaration with an initializer\n * export const canvas: IWidget = createCanvas();\n * ```\n *\n * @public\n */\nexport class ApiVariable extends ApiNameMixin(\n ApiReleaseTagMixin(ApiReadonlyMixin(ApiInitializerMixin(ApiExportedMixin(ApiDeclaredItem))))\n) {\n /**\n * An {@link Excerpt} that describes the type of the variable.\n */\n public readonly variableTypeExcerpt: Excerpt;\n\n public constructor(options: IApiVariableOptions) {\n super(options);\n\n this.variableTypeExcerpt = this.buildExcerpt(options.variableTypeTokenRange);\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiVariableOptions>,\n context: DeserializerContext,\n jsonObject: IApiVariableJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.variableTypeTokenRange = jsonObject.variableTypeTokenRange;\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.Variable}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Variable;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiVariable.getContainerKey(this.name);\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiVariableJson>): void {\n super.serializeInto(jsonObject);\n\n jsonObject.variableTypeTokenRange = this.variableTypeExcerpt.tokenRange;\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n const navigation: Navigation = this.isExported ? Navigation.Exports : Navigation.Locals;\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(navigation, nameComponent)\n .withMeaning(Meaning.Variable);\n }\n}\n"]}
1
+ {"version":3,"file":"ApiVariable.js","sourceRoot":"","sources":["../../src/model/Ap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C1E,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,MAAM,UAAU,GAAe,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,iCAAU,CAAC,OAAO,CAAC,CAAC,CAAC,iCAAU,CAAC,MAAM,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,CAAC,8BAAO,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;CACF;AAtDD,kCAsDC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n type Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\n\nimport { ApiItemKind } from '../items/ApiItem';\nimport {\n ApiDeclaredItem,\n type IApiDeclaredItemOptions,\n type IApiDeclaredItemJson\n} from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { ApiReadonlyMixin, type IApiReadonlyMixinOptions } from '../mixins/ApiReadonlyMixin';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { ApiInitializerMixin, type IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin';\nimport type { IExcerptTokenRange, Excerpt } from '../mixins/Excerpt';\nimport type { DeserializerContext } from './DeserializerContext';\nimport {\n type IApiExportedMixinJson,\n type IApiExportedMixinOptions,\n ApiExportedMixin\n} from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiVariable}.\n * @public\n */\nexport interface IApiVariableOptions\n extends IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiReadonlyMixinOptions,\n IApiDeclaredItemOptions,\n IApiInitializerMixinOptions,\n IApiExportedMixinOptions {\n variableTypeTokenRange: IExcerptTokenRange;\n}\n\nexport interface IApiVariableJson extends IApiDeclaredItemJson, IApiExportedMixinJson {\n variableTypeTokenRange: IExcerptTokenRange;\n}\n\n/**\n * Represents a TypeScript variable declaration.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiVariable` represents an exported `const` or `let` object such as these examples:\n *\n * ```ts\n * // A variable declaration\n * export let verboseLogging: boolean;\n *\n * // A constant variable declaration with an initializer\n * export const canvas: IWidget = createCanvas();\n * ```\n *\n * @public\n */\nexport class ApiVariable extends ApiNameMixin(\n ApiReleaseTagMixin(ApiReadonlyMixin(ApiInitializerMixin(ApiExportedMixin(ApiDeclaredItem))))\n) {\n /**\n * An {@link Excerpt} that describes the type of the variable.\n */\n public readonly variableTypeExcerpt: Excerpt;\n\n public constructor(options: IApiVariableOptions) {\n super(options);\n\n this.variableTypeExcerpt = this.buildExcerpt(options.variableTypeTokenRange);\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiVariableOptions>,\n context: DeserializerContext,\n jsonObject: IApiVariableJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.variableTypeTokenRange = jsonObject.variableTypeTokenRange;\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.Variable}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Variable;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiVariable.getContainerKey(this.name);\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiVariableJson>): void {\n super.serializeInto(jsonObject);\n\n jsonObject.variableTypeTokenRange = this.variableTypeExcerpt.tokenRange;\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n const navigation: Navigation = this.isExported ? Navigation.Exports : Navigation.Locals;\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(navigation, nameComponent)\n .withMeaning(Meaning.Variable);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ModelReferenceResolver.d.ts","sourceRoot":"","sources":["../../src/model/ModelReferenceResolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,uBAAuB,EAAwC,MAAM,kBAAkB,CAAC;AACtG,OAAO,EAAE,KAAK,OAAO,EAAe,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAM3C;;;;GAIG;AACH,MAAM,WAAW,kCAAkC;IACjD;;OAEG;IACH,eAAe,EAAE,OAAO,GAAG,SAAS,CAAC;IAErC;;;OAGG;IACH,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAW;gBAElB,QAAQ,EAAE,QAAQ;IAI9B,OAAO,CACZ,oBAAoB,EAAE,uBAAuB,EAC7C,cAAc,EAAE,OAAO,GAAG,SAAS,GAClC,kCAAkC;IAiGrC,OAAO,CAAC,0BAA0B;IAsDlC,OAAO,CAAC,yBAAyB;CAoClC"}
1
+ {"version":3,"file":"ModelReferenceResolver.d.ts","sourceRoot":"","sources":["../../src/model/ModelReferenceResolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,uBAAuB,EAAwC,MAAM,kBAAkB,CAAC;AAEtG,OAAO,EAAE,KAAK,OAAO,EAAe,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAM3C;;;;GAIG;AACH,MAAM,WAAW,kCAAkC;IACjD;;OAEG;IACH,eAAe,EAAE,OAAO,GAAG,SAAS,CAAC;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AqMC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { type DocDeclarationReference, type DocMemberSelector, SelectorKind } from '@microsoft/tsdoc';\nimport { type ApiItem, ApiItemKind } from '../items/ApiItem';\nimport type { ApiModel } from './ApiModel';\nimport type { ApiPackage } from './ApiPackage';\nimport type { ApiEntryPoint } from './ApiEntryPoint';\nimport { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin';\nimport { ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\n\n/**\n * Result object for {@link ApiModel.resolveDeclarationReference}.\n *\n * @public\n */\nexport interface IResolveDeclarationReferenceResult {\n /**\n * The referenced ApiItem, if the declaration reference could be resolved.\n */\n resolvedApiItem: ApiItem | undefined;\n\n /**\n * If resolvedApiItem is undefined, then this will always contain an error message explaining why the\n * resolution failed.\n */\n errorMessage: string | undefined;\n}\n\n/**\n * This resolves a TSDoc declaration reference by walking the `ApiModel` hierarchy.\n *\n * @remarks\n *\n * This class is analogous to `AstReferenceResolver` from the `@microsoft/api-extractor` project,\n * which resolves declaration references by walking the compiler state.\n */\nexport class ModelReferenceResolver {\n private readonly _apiModel: ApiModel;\n\n public constructor(apiModel: ApiModel) {\n this._apiModel = apiModel;\n }\n\n public resolve(\n declarationReference: DocDeclarationReference,\n contextApiItem: ApiItem | undefined\n ): IResolveDeclarationReferenceResult {\n const result: IResolveDeclarationReferenceResult = {\n resolvedApiItem: undefined,\n errorMessage: undefined\n };\n\n let apiPackage: ApiPackage | undefined = undefined;\n\n // Is this an absolute reference?\n if (declarationReference.packageName !== undefined) {\n apiPackage = this._apiModel.tryGetPackageByName(declarationReference.packageName);\n if (apiPackage === undefined) {\n result.errorMessage = `The package \"${declarationReference.packageName}\" could not be located`;\n return result;\n }\n } else {\n // If the package name is omitted, try to infer it from the context\n if (contextApiItem !== undefined) {\n apiPackage = contextApiItem.getAssociatedPackage();\n }\n\n if (apiPackage === undefined) {\n result.errorMessage =\n `The reference does not include a package name, and the package could not be inferred` +\n ` from the context`;\n return result;\n }\n }\n\n const importPath: string = declarationReference.importPath || '';\n\n const foundEntryPoints: ReadonlyArray<ApiEntryPoint> = apiPackage.findEntryPointsByPath(importPath);\n if (foundEntryPoints.length !== 1) {\n result.errorMessage = `The import path \"${importPath}\" could not be resolved`;\n return result;\n }\n\n let currentItem: ApiItem = foundEntryPoints[0];\n\n // Now search for the member reference\n for (const memberReference of declarationReference.memberReferences) {\n if (memberReference.memberSymbol !== undefined) {\n result.errorMessage = `Symbols are not yet supported in declaration references`;\n return result;\n }\n\n if (memberReference.memberIdentifier === undefined) {\n result.errorMessage = `Missing member identifier`;\n return result;\n }\n\n const identifier: string = memberReference.memberIdentifier.identifier;\n\n if (!ApiItemContainerMixin.isBaseClassOf(currentItem)) {\n // For example, {@link MyClass.myMethod.X} is invalid because methods cannot contain members\n result.errorMessage = `Unable to resolve ${JSON.stringify(\n identifier\n )} because ${currentItem.getScopedNameWithinPackage()} cannot act as a container`;\n return result;\n }\n\n const foundMembers: ReadonlyArray<ApiItem> = currentItem.findMembersByName(identifier);\n if (foundMembers.length === 0) {\n result.errorMessage = `The member reference ${JSON.stringify(identifier)} was not found`;\n return result;\n }\n\n const memberSelector: DocMemberSelector | undefined = memberReference.selector;\n if (memberSelector === undefined) {\n if (foundMembers.length > 1) {\n result.errorMessage = `The member reference ${JSON.stringify(identifier)} was ambiguous`;\n return result;\n }\n currentItem = foundMembers[0];\n } else {\n let memberSelectorResult: IResolveDeclarationReferenceResult;\n switch (memberSelector.selectorKind) {\n case SelectorKind.System:\n memberSelectorResult = this._selectUsingSystemSelector(foundMembers, memberSelector, identifier);\n break;\n case SelectorKind.Index:\n memberSelectorResult = this._selectUsingIndexSelector(foundMembers, memberSelector, identifier);\n break;\n default:\n result.errorMessage = `The selector \"${memberSelector.selector}\" is not a supported selector type`;\n return result;\n }\n if (memberSelectorResult.resolvedApiItem === undefined) {\n return memberSelectorResult;\n }\n currentItem = memberSelectorResult.resolvedApiItem;\n }\n }\n result.resolvedApiItem = currentItem;\n return result;\n }\n\n private _selectUsingSystemSelector(\n foundMembers: ReadonlyArray<ApiItem>,\n memberSelector: DocMemberSelector,\n identifier: string\n ): IResolveDeclarationReferenceResult {\n const result: IResolveDeclarationReferenceResult = {\n resolvedApiItem: undefined,\n errorMessage: undefined\n };\n\n const selectorName: string = memberSelector.selector;\n\n let selectorItemKind: ApiItemKind;\n switch (selectorName) {\n case 'class':\n selectorItemKind = ApiItemKind.Class;\n break;\n case 'enum':\n selectorItemKind = ApiItemKind.Enum;\n break;\n case 'function':\n selectorItemKind = ApiItemKind.Function;\n break;\n case 'interface':\n selectorItemKind = ApiItemKind.Interface;\n break;\n case 'namespace':\n selectorItemKind = ApiItemKind.Namespace;\n break;\n case 'type':\n selectorItemKind = ApiItemKind.TypeAlias;\n break;\n case 'variable':\n selectorItemKind = ApiItemKind.Variable;\n break;\n default:\n result.errorMessage = `Unsupported system selector \"${selectorName}\"`;\n return result;\n }\n\n const matches: ApiItem[] = foundMembers.filter((x) => x.kind === selectorItemKind);\n if (matches.length === 0) {\n result.errorMessage =\n `A declaration for \"${identifier}\" was not found that matches the` +\n ` TSDoc selector \"${selectorName}\"`;\n return result;\n }\n if (matches.length > 1) {\n result.errorMessage = `More than one declaration \"${identifier}\" matches the TSDoc selector \"${selectorName}\"`;\n }\n result.resolvedApiItem = matches[0];\n return result;\n }\n\n private _selectUsingIndexSelector(\n foundMembers: ReadonlyArray<ApiItem>,\n memberSelector: DocMemberSelector,\n identifier: string\n ): IResolveDeclarationReferenceResult {\n const result: IResolveDeclarationReferenceResult = {\n resolvedApiItem: undefined,\n errorMessage: undefined\n };\n\n const selectedMembers: ApiItem[] = [];\n\n const selectorOverloadIndex: number = parseInt(memberSelector.selector, 10);\n for (const foundMember of foundMembers) {\n if (ApiParameterListMixin.isBaseClassOf(foundMember)) {\n if (foundMember.overloadIndex === selectorOverloadIndex) {\n selectedMembers.push(foundMember);\n }\n }\n }\n\n if (selectedMembers.length === 0) {\n result.errorMessage =\n `An overload for ${JSON.stringify(identifier)} was not found that matches` +\n ` the TSDoc selector \":${selectorOverloadIndex}\"`;\n return result;\n }\n\n if (selectedMembers.length === 1) {\n result.resolvedApiItem = selectedMembers[0];\n return result;\n }\n\n result.errorMessage = `The member reference ${JSON.stringify(identifier)} was ambiguous`;\n return result;\n }\n}\n"]}
1
+ {"version":3,"file":"ModelReferenceResolver.js","sourceRoot":"","sources":["../../src/model/ModelReferenceResolver.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,4CAAsG;AAEtG,8CAA6D;AAI7D,2EAAwE;AACxE,2EAAwE;AAoBxE;;;;;;;GAOG;AACH,MAAa,sBAAsB;IAGjC,YAAmB,QAAkB;QACnC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAEM,OAAO,CACZ,oBAA6C,EAC7C,cAAmC;QAEnC,MAAM,MAAM,GAAuC;YACjD,eAAe,EAAE,SAAS;YAC1B,YAAY,EAAE,SAAS;SACxB,CAAC;QAEF,IAAI,UAAU,GAA2B,SAAS,CAAC;QAEnD,iCAAiC;QACjC,IAAI,oBAAoB,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACnD,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC;YAClF,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;gBAC7B,MAAM,CAAC,YAAY,GAAG,gBAAgB,oBAAoB,CAAC,WAAW,wBAAwB,CAAC;gBAC/F,OAAO,MAAM,CAAC;YAChB,CAAC;QACH,CAAC;aAAM,CAAC;YACN,mEAAmE;YACnE,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;gBACjC,UAAU,GAAG,cAAc,CAAC,oBAAoB,EAAE,CAAC;YACrD,CAAC;YAED,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;gBAC7B,MAAM,CAAC,YA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AG,CAAC;QACjH,CAAC;QACD,MAAM,CAAC,eAAe,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACpC,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,yBAAyB,CAC/B,YAAoC,EACpC,cAAiC,EACjC,UAAkB;QAElB,MAAM,MAAM,GAAuC;YACjD,eAAe,EAAE,SAAS;YAC1B,YAAY,EAAE,SAAS;SACxB,CAAC;QAEF,MAAM,eAAe,GAAc,EAAE,CAAC;QAEtC,MAAM,qBAAqB,GAAW,QAAQ,CAAC,cAAc,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC5E,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;YACvC,IAAI,6CAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC;gBACrD,IAAI,WAAW,CAAC,aAAa,KAAK,qBAAqB,EAAE,CAAC;oBACxD,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBACpC,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACjC,MAAM,CAAC,YAAY;gBACjB,mBAAmB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,6BAA6B;oBAC1E,yBAAyB,qBAAqB,GAAG,CAAC;YACpD,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACjC,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;YAC5C,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,MAAM,CAAC,YAAY,GAAG,wBAAwB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,gBAAgB,CAAC;QACzF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AArMD,wDAqMC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { type DocDeclarationReference, type DocMemberSelector, SelectorKind } from '@microsoft/tsdoc';\n\nimport { type ApiItem, ApiItemKind } from '../items/ApiItem';\nimport type { ApiModel } from './ApiModel';\nimport type { ApiPackage } from './ApiPackage';\nimport type { ApiEntryPoint } from './ApiEntryPoint';\nimport { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin';\nimport { ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\n\n/**\n * Result object for {@link ApiModel.resolveDeclarationReference}.\n *\n * @public\n */\nexport interface IResolveDeclarationReferenceResult {\n /**\n * The referenced ApiItem, if the declaration reference could be resolved.\n */\n resolvedApiItem: ApiItem | undefined;\n\n /**\n * If resolvedApiItem is undefined, then this will always contain an error message explaining why the\n * resolution failed.\n */\n errorMessage: string | undefined;\n}\n\n/**\n * This resolves a TSDoc declaration reference by walking the `ApiModel` hierarchy.\n *\n * @remarks\n *\n * This class is analogous to `AstReferenceResolver` from the `@microsoft/api-extractor` project,\n * which resolves declaration references by walking the compiler state.\n */\nexport class ModelReferenceResolver {\n private readonly _apiModel: ApiModel;\n\n public constructor(apiModel: ApiModel) {\n this._apiModel = apiModel;\n }\n\n public resolve(\n declarationReference: DocDeclarationReference,\n contextApiItem: ApiItem | undefined\n ): IResolveDeclarationReferenceResult {\n const result: IResolveDeclarationReferenceResult = {\n resolvedApiItem: undefined,\n errorMessage: undefined\n };\n\n let apiPackage: ApiPackage | undefined = undefined;\n\n // Is this an absolute reference?\n if (declarationReference.packageName !== undefined) {\n apiPackage = this._apiModel.tryGetPackageByName(declarationReference.packageName);\n if (apiPackage === undefined) {\n result.errorMessage = `The package \"${declarationReference.packageName}\" could not be located`;\n return result;\n }\n } else {\n // If the package name is omitted, try to infer it from the context\n if (contextApiItem !== undefined) {\n apiPackage = contextApiItem.getAssociatedPackage();\n }\n\n if (apiPackage === undefined) {\n result.errorMessage =\n `The reference does not include a package name, and the package could not be inferred` +\n ` from the context`;\n return result;\n }\n }\n\n const importPath: string = declarationReference.importPath || '';\n\n const foundEntryPoints: ReadonlyArray<ApiEntryPoint> = apiPackage.findEntryPointsByPath(importPath);\n if (foundEntryPoints.length !== 1) {\n result.errorMessage = `The import path \"${importPath}\" could not be resolved`;\n return result;\n }\n\n let currentItem: ApiItem = foundEntryPoints[0];\n\n // Now search for the member reference\n for (const memberReference of declarationReference.memberReferences) {\n if (memberReference.memberSymbol !== undefined) {\n result.errorMessage = `Symbols are not yet supported in declaration references`;\n return result;\n }\n\n if (memberReference.memberIdentifier === undefined) {\n result.errorMessage = `Missing member identifier`;\n return result;\n }\n\n const identifier: string = memberReference.memberIdentifier.identifier;\n\n if (!ApiItemContainerMixin.isBaseClassOf(currentItem)) {\n // For example, {@link MyClass.myMethod.X} is invalid because methods cannot contain members\n result.errorMessage = `Unable to resolve ${JSON.stringify(\n identifier\n )} because ${currentItem.getScopedNameWithinPackage()} cannot act as a container`;\n return result;\n }\n\n const foundMembers: ReadonlyArray<ApiItem> = currentItem.findMembersByName(identifier);\n if (foundMembers.length === 0) {\n result.errorMessage = `The member reference ${JSON.stringify(identifier)} was not found`;\n return result;\n }\n\n const memberSelector: DocMemberSelector | undefined = memberReference.selector;\n if (memberSelector === undefined) {\n if (foundMembers.length > 1) {\n result.errorMessage = `The member reference ${JSON.stringify(identifier)} was ambiguous`;\n return result;\n }\n currentItem = foundMembers[0];\n } else {\n let memberSelectorResult: IResolveDeclarationReferenceResult;\n switch (memberSelector.selectorKind) {\n case SelectorKind.System:\n memberSelectorResult = this._selectUsingSystemSelector(foundMembers, memberSelector, identifier);\n break;\n case SelectorKind.Index:\n memberSelectorResult = this._selectUsingIndexSelector(foundMembers, memberSelector, identifier);\n break;\n default:\n result.errorMessage = `The selector \"${memberSelector.selector}\" is not a supported selector type`;\n return result;\n }\n if (memberSelectorResult.resolvedApiItem === undefined) {\n return memberSelectorResult;\n }\n currentItem = memberSelectorResult.resolvedApiItem;\n }\n }\n result.resolvedApiItem = currentItem;\n return result;\n }\n\n private _selectUsingSystemSelector(\n foundMembers: ReadonlyArray<ApiItem>,\n memberSelector: DocMemberSelector,\n identifier: string\n ): IResolveDeclarationReferenceResult {\n const result: IResolveDeclarationReferenceResult = {\n resolvedApiItem: undefined,\n errorMessage: undefined\n };\n\n const selectorName: string = memberSelector.selector;\n\n let selectorItemKind: ApiItemKind;\n switch (selectorName) {\n case 'class':\n selectorItemKind = ApiItemKind.Class;\n break;\n case 'enum':\n selectorItemKind = ApiItemKind.Enum;\n break;\n case 'function':\n selectorItemKind = ApiItemKind.Function;\n break;\n case 'interface':\n selectorItemKind = ApiItemKind.Interface;\n break;\n case 'namespace':\n selectorItemKind = ApiItemKind.Namespace;\n break;\n case 'type':\n selectorItemKind = ApiItemKind.TypeAlias;\n break;\n case 'variable':\n selectorItemKind = ApiItemKind.Variable;\n break;\n default:\n result.errorMessage = `Unsupported system selector \"${selectorName}\"`;\n return result;\n }\n\n const matches: ApiItem[] = foundMembers.filter((x) => x.kind === selectorItemKind);\n if (matches.length === 0) {\n result.errorMessage =\n `A declaration for \"${identifier}\" was not found that matches the` +\n ` TSDoc selector \"${selectorName}\"`;\n return result;\n }\n if (matches.length > 1) {\n result.errorMessage = `More than one declaration \"${identifier}\" matches the TSDoc selector \"${selectorName}\"`;\n }\n result.resolvedApiItem = matches[0];\n return result;\n }\n\n private _selectUsingIndexSelector(\n foundMembers: ReadonlyArray<ApiItem>,\n memberSelector: DocMemberSelector,\n identifier: string\n ): IResolveDeclarationReferenceResult {\n const result: IResolveDeclarationReferenceResult = {\n resolvedApiItem: undefined,\n errorMessage: undefined\n };\n\n const selectedMembers: ApiItem[] = [];\n\n const selectorOverloadIndex: number = parseInt(memberSelector.selector, 10);\n for (const foundMember of foundMembers) {\n if (ApiParameterListMixin.isBaseClassOf(foundMember)) {\n if (foundMember.overloadIndex === selectorOverloadIndex) {\n selectedMembers.push(foundMember);\n }\n }\n }\n\n if (selectedMembers.length === 0) {\n result.errorMessage =\n `An overload for ${JSON.stringify(identifier)} was not found that matches` +\n ` the TSDoc selector \":${selectorOverloadIndex}\"`;\n return result;\n }\n\n if (selectedMembers.length === 1) {\n result.resolvedApiItem = selectedMembers[0];\n return result;\n }\n\n result.errorMessage = `The member reference ${JSON.stringify(identifier)} was ambiguous`;\n return result;\n }\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.SourceLocation = void 0;
6
- const url_1 = require("url");
6
+ const node_url_1 = require("node:url");
7
7
  /**
8
8
  * The source location where a given API item is declared.
9
9
  *
@@ -31,7 +31,7 @@ class SourceLocation {
31
31
  if (!projectFolderUrl.endsWith('/')) {
32
32
  projectFolderUrl += '/';
33
33
  }
34
- const url = new url_1.URL(this._fileUrlPath, projectFolderUrl);
34
+ const url = new node_url_1.URL(this._fileUrlPath, projectFolderUrl);
35
35
  return url.href;
36
36
  }
37
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SourceLocation.js","sourceRoot":"","sources":["../../src/model/SourceLocation.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,6BAA0B;AAoB1B;;;;;;;;;GASG;AACH,MAAa,cAAc;IAIzB,YAAmB,OAA+B;QAChD,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QAClD,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,IAAW,OAAO;QAChB,IAAI,IAAI,CAAC,iBAAiB,KAAK,SAAS,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;YAC5E,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,gBAAgB,GAAW,IAAI,CAAC,iBAAiB,CAAC;QACtD,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACpC,gBAAgB,IAAI,GAAG,CAAC;QAC1B,CAAC;QAED,MAAM,GAAG,GAAQ,IAAI,SAAG,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;QAC9D,OAAO,GAAG,CAAC,IAAI,CAAC;IAClB,CAAC;CACF;AA1BD,wCA0BC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { URL } from 'url';\n\n/**\n * Constructor options for `SourceLocation`.\n * @public\n */\nexport interface ISourceLocationOptions {\n /**\n * The project folder URL as defined by the `api-extractor.json` config `projectFolderUrl`\n * setting.\n */\n projectFolderUrl?: string;\n\n /**\n * The file URL path relative to the `projectFolder` and `projectFolderURL` fields as\n * defined in the `api-extractor.json` config.\n */\n fileUrlPath?: string;\n}\n\n/**\n * The source location where a given API item is declared.\n *\n * @remarks\n * The source location points to the `.ts` source file where the API item was originally\n declared. However, in some cases, if source map resolution fails, it falls back to pointing\n to the `.d.ts` file instead.\n *\n * @public\n */\nexport class SourceLocation {\n private readonly _projectFolderUrl?: string;\n private readonly _fileUrlPath?: string;\n\n public constructor(options: ISourceLocationOptions) {\n this._projectFolderUrl = options.projectFolderUrl;\n this._fileUrlPath = options.fileUrlPath;\n }\n\n /**\n * Returns the file URL to the given source location. Returns `undefined` if the file URL\n * cannot be determined.\n */\n public get fileUrl(): string | undefined {\n if (this._projectFolderUrl === undefined || this._fileUrlPath === undefined) {\n return undefined;\n }\n\n let projectFolderUrl: string = this._projectFolderUrl;\n if (!projectFolderUrl.endsWith('/')) {\n projectFolderUrl += '/';\n }\n\n const url: URL = new URL(this._fileUrlPath, projectFolderUrl);\n return url.href;\n }\n}\n"]}
1
+ {"version":3,"file":"SourceLocation.js","sourceRoot":"","sources":["../../src/model/SourceLocation.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,uCAA+B;AAoB/B;;;;;;;;;GASG;AACH,MAAa,cAAc;IAIzB,YAAmB,OAA+B;QAChD,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QAClD,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,IAAW,OAAO;QAChB,IAAI,IAAI,CAAC,iBAAiB,KAAK,SAAS,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;YAC5E,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,gBAAgB,GAAW,IAAI,CAAC,iBAAiB,CAAC;QACtD,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACpC,gBAAgB,IAAI,GAAG,CAAC;QAC1B,CAAC;QAED,MAAM,GAAG,GAAQ,IAAI,cAAG,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;QAC9D,OAAO,GAAG,CAAC,IAAI,CAAC;IAClB,CAAC;CACF;AA1BD,wCA0BC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { URL } from 'node:url';\n\n/**\n * Constructor options for `SourceLocation`.\n * @public\n */\nexport interface ISourceLocationOptions {\n /**\n * The project folder URL as defined by the `api-extractor.json` config `projectFolderUrl`\n * setting.\n */\n projectFolderUrl?: string;\n\n /**\n * The file URL path relative to the `projectFolder` and `projectFolderURL` fields as\n * defined in the `api-extractor.json` config.\n */\n fileUrlPath?: string;\n}\n\n/**\n * The source location where a given API item is declared.\n *\n * @remarks\n * The source location points to the `.ts` source file where the API item was originally\n declared. However, in some cases, if source map resolution fails, it falls back to pointing\n to the `.d.ts` file instead.\n *\n * @public\n */\nexport class SourceLocation {\n private readonly _projectFolderUrl?: string;\n private readonly _fileUrlPath?: string;\n\n public constructor(options: ISourceLocationOptions) {\n this._projectFolderUrl = options.projectFolderUrl;\n this._fileUrlPath = options.fileUrlPath;\n }\n\n /**\n * Returns the file URL to the given source location. Returns `undefined` if the file URL\n * cannot be determined.\n */\n public get fileUrl(): string | undefined {\n if (this._projectFolderUrl === undefined || this._fileUrlPath === undefined) {\n return undefined;\n }\n\n let projectFolderUrl: string = this._projectFolderUrl;\n if (!projectFolderUrl.endsWith('/')) {\n projectFolderUrl += '/';\n }\n\n const url: URL = new URL(this._fileUrlPath, projectFolderUrl);\n return url.href;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/api-extractor-model",
3
- "version": "7.30.9",
3
+ "version": "7.31.0",
4
4
  "description": "A helper library for loading and saving the .api.json files created by API Extractor",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,10 +14,10 @@
14
14
  "dependencies": {
15
15
  "@microsoft/tsdoc": "~0.15.1",
16
16
  "@microsoft/tsdoc-config": "~0.17.1",
17
- "@rushstack/node-core-library": "5.15.1"
17
+ "@rushstack/node-core-library": "5.16.0"
18
18
  },
19
19
  "devDependencies": {
20
- "@rushstack/heft": "0.74.3",
20
+ "@rushstack/heft": "1.0.0",
21
21
  "eslint": "~9.25.1",
22
22
  "decoupled-local-node-rig": "1.0.0"
23
23
  },