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

1 line
4.2 KiB
Plaintext

{"version":3,"file":"ApiMethodSignature.js","sourceRoot":"","sources":["../../src/model/ApiMethodSignature.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,8DAAyF;AACzF,2EAA4G;AAC5G,qEAAmG;AACnG,qEAAmG;AACnG,yDAAiF;AACjF,mFAG6C;AAC7C,iEAA6F;AAY7F;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAa,kBAAmB,SAAQ,IAAA,2BAAY,EAClD,IAAA,qDAAyB,EACvB,IAAA,6CAAqB,EAAC,IAAA,uCAAkB,EAAC,IAAA,uCAAkB,EAAC,IAAA,mCAAgB,EAAC,iCAAe,CAAC,CAAC,CAAC,CAAC,CACjG,CACF;IACC,YAAmB,OAAmC;QACpD,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY,EAAE,aAAqB;QAC/D,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,eAAe,IAAI,aAAa,EAAE,CAAC;IACnE,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,eAAe,CAAC;IACrC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,kBAAkB,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3E,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,+BAAqB,aAAa,CAAC;aACpD,WAAW,+BAAgB;aAC3B,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3C,CAAC;CACF;AA/BD,gDA+BC","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 { ApiDeclaredItem, type IApiDeclaredItemOptions } from '../items/ApiDeclaredItem';\nimport { ApiParameterListMixin, type IApiParameterListMixinOptions } from '../mixins/ApiParameterListMixin';\nimport { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { type IApiReturnTypeMixinOptions, ApiReturnTypeMixin } from '../mixins/ApiReturnTypeMixin';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport {\n type IApiTypeParameterListMixinOptions,\n ApiTypeParameterListMixin\n} from '../mixins/ApiTypeParameterListMixin';\nimport { ApiOptionalMixin, type IApiOptionalMixinOptions } from '../mixins/ApiOptionalMixin';\n\n/** @public */\nexport interface IApiMethodSignatureOptions\n extends IApiNameMixinOptions,\n IApiTypeParameterListMixinOptions,\n IApiParameterListMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiReturnTypeMixinOptions,\n IApiOptionalMixinOptions,\n IApiDeclaredItemOptions {}\n\n/**\n * Represents a TypeScript member function 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 * `ApiMethodSignature` represents a TypeScript declaration such as the `render` member function in this example:\n *\n * ```ts\n * export interface IWidget {\n * render(): void;\n * }\n * ```\n *\n * Compare with {@link ApiMethod}, which represents a method belonging to a class.\n * For example, a class method can be `static` but an interface method cannot.\n *\n * @public\n */\nexport class ApiMethodSignature extends ApiNameMixin(\n ApiTypeParameterListMixin(\n ApiParameterListMixin(ApiReleaseTagMixin(ApiReturnTypeMixin(ApiOptionalMixin(ApiDeclaredItem))))\n )\n) {\n public constructor(options: IApiMethodSignatureOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string, overloadIndex: number): string {\n return `${name}|${ApiItemKind.MethodSignature}|${overloadIndex}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.MethodSignature;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiMethodSignature.getContainerKey(this.name, this.overloadIndex);\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 .withOverloadIndex(this.overloadIndex);\n }\n}\n"]}