utils/node_modules/@microsoft/api-extractor-model/lib/model/ApiIndexSignature.js.map
2024-02-07 01:33:07 -05:00

1 line
3.6 KiB
Plaintext

{"version":3,"file":"ApiIndexSignature.js","sourceRoot":"","sources":["../../src/model/ApiIndexSignature.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAIiE;AACjE,8CAA+C;AAC/C,8DAAyF;AACzF,2EAA4G;AAC5G,qEAAmG;AACnG,qEAAmG;AACnG,iEAA6F;AAa7F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,iBAAkB,SAAQ,IAAA,6CAAqB,EAC1D,IAAA,uCAAkB,EAAC,IAAA,uCAAkB,EAAC,IAAA,mCAAgB,EAAC,iCAAe,CAAC,CAAC,CAAC,CAC1E;IACC,YAAmB,OAAkC;QACnD,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,aAAqB;QACjD,OAAO,IAAI,qBAAW,CAAC,cAAc,IAAI,aAAa,EAAE,CAAC;IAC3D,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,cAAc,CAAC;IACpC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,iBAAiB,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC/D,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,MAAM,GAAyB,IAAI,CAAC,MAAM;YAC9C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB;YAChC,CAAC,CAAC,iDAAiD;gBACjD,2CAAoB,CAAC,KAAK,EAAE,CAAC,iBAAiB,+BAAqB,UAAU,CAAC,CAAC;QACnF,OAAO,MAAM,CAAC,WAAW,sCAAwB,CAAC,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC1F,CAAC;CACF;AA7BD,8CA6BC","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} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport { ApiItemKind } from '../items/ApiItem';\nimport { type IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';\nimport { type IApiParameterListMixinOptions, ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\nimport { type IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';\nimport { type IApiReturnTypeMixinOptions, ApiReturnTypeMixin } from '../mixins/ApiReturnTypeMixin';\nimport { type IApiReadonlyMixinOptions, ApiReadonlyMixin } from '../mixins/ApiReadonlyMixin';\n\n/**\n * Constructor options for {@link ApiIndexSignature}.\n * @public\n */\nexport interface IApiIndexSignatureOptions\n extends IApiParameterListMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiReturnTypeMixinOptions,\n IApiReadonlyMixinOptions,\n IApiDeclaredItemOptions {}\n\n/**\n * Represents a TypeScript index signature.\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 * `ApiIndexSignature` represents a TypeScript declaration such as `[x: number]: number` in this example:\n *\n * ```ts\n * export interface INumberTable {\n * // An index signature\n * [value: number]: number;\n *\n * // An overloaded index signature\n * [name: string]: number;\n * }\n * ```\n *\n * @public\n */\nexport class ApiIndexSignature extends ApiParameterListMixin(\n ApiReleaseTagMixin(ApiReturnTypeMixin(ApiReadonlyMixin(ApiDeclaredItem)))\n) {\n public constructor(options: IApiIndexSignatureOptions) {\n super(options);\n }\n\n public static getContainerKey(overloadIndex: number): string {\n return `|${ApiItemKind.IndexSignature}|${overloadIndex}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.IndexSignature;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiIndexSignature.getContainerKey(this.overloadIndex);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const parent: DeclarationReference = this.parent\n ? this.parent.canonicalReference\n : // .withMeaning() requires some kind of component\n DeclarationReference.empty().addNavigationStep(Navigation.Members, '(parent)');\n return parent.withMeaning(Meaning.IndexSignature).withOverloadIndex(this.overloadIndex);\n }\n}\n"]}