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

1 line
5.1 KiB
Plaintext

{"version":3,"file":"ApiMethod.js","sourceRoot":"","sources":["../../src/model/ApiMethod.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,mEAAgG;AAChG,6DAAuF;AACvF,8DAAyF;AACzF,2EAA4G;AAC5G,qEAAmG;AACnG,qEAAmG;AACnG,yDAAiF;AACjF,iEAA6F;AAC7F,mFAG6C;AAC7C,iEAA6F;AAkB7F;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAa,SAAU,SAAQ,IAAA,2BAAY,EACzC,IAAA,mCAAgB,EACd,IAAA,mCAAgB,EACd,IAAA,6CAAqB,EACnB,IAAA,qCAAiB,EACf,IAAA,uCAAkB,EAAC,IAAA,uCAAkB,EAAC,IAAA,+BAAc,EAAC,IAAA,qDAAyB,EAAC,iCAAe,CAAC,CAAC,CAAC,CAAC,CACnG,CACF,CACF,CACF,CACF;IACC,YAAmB,OAA0B;QAC3C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY,EAAE,QAAiB,EAAE,aAAqB;QAClF,IAAI,QAAQ,EAAE;YACZ,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,MAAM,WAAW,aAAa,EAAE,CAAC;SAChE;aAAM;YACL,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,MAAM,aAAa,aAAa,EAAE,CAAC;SAClE;IACH,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,MAAM,CAAC;IAC5B,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACjF,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,8BAAoB,CAAC,6BAAmB,EAAE,aAAa,CAAC;aACzF,WAAW,+BAAgB;aAC3B,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3C,CAAC;CACF;AAzCD,8BAyCC","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 { ApiProtectedMixin, type IApiProtectedMixinOptions } from '../mixins/ApiProtectedMixin';\nimport { ApiStaticMixin, type IApiStaticMixinOptions } from '../mixins/ApiStaticMixin';\nimport { type IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';\nimport { type IApiParameterListMixinOptions, ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\nimport { type IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';\nimport { ApiReturnTypeMixin, type IApiReturnTypeMixinOptions } from '../mixins/ApiReturnTypeMixin';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { type IApiAbstractMixinOptions, ApiAbstractMixin } from '../mixins/ApiAbstractMixin';\nimport {\n ApiTypeParameterListMixin,\n type IApiTypeParameterListMixinOptions\n} from '../mixins/ApiTypeParameterListMixin';\nimport { ApiOptionalMixin, type IApiOptionalMixinOptions } from '../mixins/ApiOptionalMixin';\n\n/**\n * Constructor options for {@link ApiMethod}.\n * @public\n */\nexport interface IApiMethodOptions\n extends IApiNameMixinOptions,\n IApiAbstractMixinOptions,\n IApiOptionalMixinOptions,\n IApiParameterListMixinOptions,\n IApiProtectedMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiReturnTypeMixinOptions,\n IApiStaticMixinOptions,\n IApiTypeParameterListMixinOptions,\n IApiDeclaredItemOptions {}\n\n/**\n * Represents a TypeScript member function 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 * `ApiMethod` represents a TypeScript declaration such as the `render` member function in this example:\n *\n * ```ts\n * export class Widget {\n * public render(): void { }\n * }\n * ```\n *\n * Compare with {@link ApiMethodSignature}, which represents a method belonging to an interface.\n * For example, a class method can be `static` but an interface method cannot.\n *\n * @public\n */\nexport class ApiMethod extends ApiNameMixin(\n ApiAbstractMixin(\n ApiOptionalMixin(\n ApiParameterListMixin(\n ApiProtectedMixin(\n ApiReleaseTagMixin(ApiReturnTypeMixin(ApiStaticMixin(ApiTypeParameterListMixin(ApiDeclaredItem))))\n )\n )\n )\n )\n) {\n public constructor(options: IApiMethodOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string, isStatic: boolean, overloadIndex: number): string {\n if (isStatic) {\n return `${name}|${ApiItemKind.Method}|static|${overloadIndex}`;\n } else {\n return `${name}|${ApiItemKind.Method}|instance|${overloadIndex}`;\n }\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Method;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiMethod.getContainerKey(this.name, this.isStatic, 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(this.isStatic ? Navigation.Exports : Navigation.Members, nameComponent)\n .withMeaning(Meaning.Member)\n .withOverloadIndex(this.overloadIndex);\n }\n}\n"]}