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AO,CAAC,kBAAkB,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"]}
{"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"]}
{"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,OAA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,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 {\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"]}
{"version":3,"file":"ApiProperty.js","sourceRoot":"","sources":["../../src/model/ApiProperty.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AAEjE,8CAA+C;AAC/C,iEAA6F;AAC7F,mE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CC","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"]}
{"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"]}