Commit 107cdd2d authored by DatHV's avatar DatHV
Browse files

update build x-app-sdk

parent 9bb8aadd
Pipeline #2082 failed with stages
in 0 seconds
"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiCallSignature = void 0;
const DeclarationReference_1 = require("@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference");
const ApiItem_1 = require("../items/ApiItem");
const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
const ApiParameterListMixin_1 = require("../mixins/ApiParameterListMixin");
const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
const ApiReturnTypeMixin_1 = require("../mixins/ApiReturnTypeMixin");
const ApiTypeParameterListMixin_1 = require("../mixins/ApiTypeParameterListMixin");
/**
* Represents a TypeScript function call signature.
*
* @remarks
*
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
* API declarations.
*
* `ApiCallSignature` represents a TypeScript declaration such as `(x: number, y: number): number`
* in this example:
*
* ```ts
* export interface IChooser {
* // A call signature:
* (x: number, y: number): number;
*
* // Another overload for this call signature:
* (x: string, y: string): string;
* }
*
* function chooseFirst<T>(x: T, y: T): T {
* return x;
* }
*
* let chooser: IChooser = chooseFirst;
* ```
*
* @public
*/
class ApiCallSignature extends (0, ApiTypeParameterListMixin_1.ApiTypeParameterListMixin)((0, ApiParameterListMixin_1.ApiParameterListMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiReturnTypeMixin_1.ApiReturnTypeMixin)(ApiDeclaredItem_1.ApiDeclaredItem)))) {
constructor(options) {
super(options);
}
static getContainerKey(overloadIndex) {
return `|${ApiItem_1.ApiItemKind.CallSignature}|${overloadIndex}`;
}
/** @override */
get kind() {
return ApiItem_1.ApiItemKind.CallSignature;
}
/** @override */
get containerKey() {
return ApiCallSignature.getContainerKey(this.overloadIndex);
}
/** @beta @override */
buildCanonicalReference() {
const parent = this.parent
? this.parent.canonicalReference
: // .withMeaning() requires some kind of component
DeclarationReference_1.DeclarationReference.empty().addNavigationStep(DeclarationReference_1.Navigation.Members, '(parent)');
return parent.withMeaning(DeclarationReference_1.Meaning.CallSignature).withOverloadIndex(this.overloadIndex);
}
}
exports.ApiCallSignature = ApiCallSignature;
//# sourceMappingURL=ApiCallSignature.js.map
\ No newline at end of file
{"version":3,"file":"ApiCallSignature.js","sourceRoot":"","sources":["../../src/model/ApiCallSignature.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAIiE;AAEjE,8CAA+C;AAC/C,8DAAyF;AACzF,2EAA4G;AAC5G,qEAAmG;AACnG,qEAAmG;AACnG,mFAG6C;AAa7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAa,gBAAiB,SAAQ,IAAA,qDAAyB,EAC7D,IAAA,6CAAqB,EAAC,IAAA,uCAAkB,EAAC,IAAA,uCAAkB,EAAC,iCAAe,CAAC,CAAC,CAAC,CAC/E;IACC,YAAmB,OAAiC;QAClD,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,aAAqB;QACjD,OAAO,IAAI,qBAAW,CAAC,aAAa,IAAI,aAAa,EAAE,CAAC;IAC1D,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,aAAa,CAAC;IACnC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,gBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC9D,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,CAAC,iCAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACnF,OAAO,MAAM,CAAC,WAAW,CAAC,8BAAO,CAAC,aAAa,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACzF,CAAC;CACF;AA7BD,4CA6BC","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';\n\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 {\n type IApiTypeParameterListMixinOptions,\n ApiTypeParameterListMixin\n} from '../mixins/ApiTypeParameterListMixin';\n\n/**\n * Constructor options for {@link ApiCallSignature}.\n * @public\n */\nexport interface IApiCallSignatureOptions\n extends IApiTypeParameterListMixinOptions,\n IApiParameterListMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiReturnTypeMixinOptions,\n IApiDeclaredItemOptions {}\n\n/**\n * Represents a TypeScript function call 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 * `ApiCallSignature` represents a TypeScript declaration such as `(x: number, y: number): number`\n * in this example:\n *\n * ```ts\n * export interface IChooser {\n * // A call signature:\n * (x: number, y: number): number;\n *\n * // Another overload for this call signature:\n * (x: string, y: string): string;\n * }\n *\n * function chooseFirst<T>(x: T, y: T): T {\n * return x;\n * }\n *\n * let chooser: IChooser = chooseFirst;\n * ```\n *\n * @public\n */\nexport class ApiCallSignature extends ApiTypeParameterListMixin(\n ApiParameterListMixin(ApiReleaseTagMixin(ApiReturnTypeMixin(ApiDeclaredItem)))\n) {\n public constructor(options: IApiCallSignatureOptions) {\n super(options);\n }\n\n public static getContainerKey(overloadIndex: number): string {\n return `|${ApiItemKind.CallSignature}|${overloadIndex}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.CallSignature;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiCallSignature.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.CallSignature).withOverloadIndex(this.overloadIndex);\n }\n}\n"]}
\ No newline at end of file
import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
import { ApiItemKind } from '../items/ApiItem';
import { ApiDeclaredItem, type IApiDeclaredItemOptions, type IApiDeclaredItemJson } from '../items/ApiDeclaredItem';
import { ApiItemContainerMixin, type IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';
import { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';
import type { IExcerptTokenRange } from '../mixins/Excerpt';
import { HeritageType } from './HeritageType';
import { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
import { ApiTypeParameterListMixin, type IApiTypeParameterListMixinOptions, type IApiTypeParameterListMixinJson } from '../mixins/ApiTypeParameterListMixin';
import type { DeserializerContext } from './DeserializerContext';
import { type IApiExportedMixinJson, type IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';
import { ApiAbstractMixin, type IApiAbstractMixinJson, type IApiAbstractMixinOptions } from '../mixins/ApiAbstractMixin';
/**
* Constructor options for {@link ApiClass}.
* @public
*/
export interface IApiClassOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiAbstractMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiTypeParameterListMixinOptions, IApiExportedMixinOptions {
extendsTokenRange: IExcerptTokenRange | undefined;
implementsTokenRanges: IExcerptTokenRange[];
}
export interface IApiClassJson extends IApiDeclaredItemJson, IApiAbstractMixinJson, IApiTypeParameterListMixinJson, IApiExportedMixinJson {
extendsTokenRange?: IExcerptTokenRange;
implementsTokenRanges: IExcerptTokenRange[];
}
declare const ApiClass_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiTypeParameterListMixin) & (new (...args: any[]) => ApiAbstractMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
/**
* Represents a TypeScript class declaration.
*
* @remarks
*
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
* API declarations.
*
* `ApiClass` represents a TypeScript declaration such as this:
*
* ```ts
* export class X { }
* ```
*
* @public
*/
export declare class ApiClass extends ApiClass_base {
/**
* The base class that this class inherits from (using the `extends` keyword), or undefined if there is no base class.
*/
readonly extendsType: HeritageType | undefined;
private readonly _implementsTypes;
constructor(options: IApiClassOptions);
static getContainerKey(name: string): string;
/** @override */
static onDeserializeInto(options: Partial<IApiClassOptions>, context: DeserializerContext, jsonObject: IApiClassJson): void;
/** @override */
get kind(): ApiItemKind;
/** @override */
get containerKey(): string;
/**
* The list of interfaces that this class implements using the `implements` keyword.
*/
get implementsTypes(): ReadonlyArray<HeritageType>;
/** @override */
serializeInto(jsonObject: Partial<IApiClassJson>): void;
/** @beta @override */
buildCanonicalReference(): DeclarationReference;
}
export {};
//# sourceMappingURL=ApiClass.d.ts.map
\ No newline at end of file
{"version":3,"file":"ApiClass.d.ts","sourceRoot":"","sources":["../../src/model/ApiClass.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AAEjE,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,qBAAqB,EAAE,KAAK,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAE,KAAK,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,KAAK,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EACL,yBAAyB,EACzB,KAAK,iCAAiC,EACtC,KAAK,8BAA8B,EACpC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC9B,MAAM,4BAA4B,CAAC;AAEpC;;;GAGG;AACH,MAAM,WAAW,gBACf,SAAQ,6BAA6B,EACnC,oBAAoB,EACpB,wBAAwB,EACxB,0BAA0B,EAC1B,uBAAuB,EACvB,iCAAiC,EACjC,wBAAwB;IAC1B,iBAAiB,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAClD,qBAAqB,EAAE,kBAAkB,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,aACf,SAAQ,oBAAoB,EAC1B,qBAAqB,EACrB,8BAA8B,EAC9B,qBAAqB;IACvB,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,qBAAqB,EAAE,kBAAkB,EAAE,CAAC;CAC7C;;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,QAAS,SAAQ,aAI7B;IACC;;OAEG;IACH,SAAgB,WAAW,EAAE,YAAY,GAAG,SAAS,CAAC;IAEtD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAsB;gBAEpC,OAAO,EAAE,gBAAgB;WAc9B,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAInD,gBAAgB;WACF,iBAAiB,CAC7B,OAAO,EAAE,OAAO,CAAC,gBAAgB,CAAC,EAClC,OAAO,EAAE,mBAAmB,EAC5B,UAAU,EAAE,aAAa,GACxB,IAAI;IAOP,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED;;OAEG;IACH,IAAW,eAAe,IAAI,aAAa,CAAC,YAAY,CAAC,CAExD;IAED,gBAAgB;IACT,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI;IAW9D,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAOvD"}
\ No newline at end of file
"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiClass = void 0;
const DeclarationReference_1 = require("@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference");
const ApiItem_1 = require("../items/ApiItem");
const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
const ApiItemContainerMixin_1 = require("../mixins/ApiItemContainerMixin");
const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
const HeritageType_1 = require("./HeritageType");
const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
const ApiTypeParameterListMixin_1 = require("../mixins/ApiTypeParameterListMixin");
const ApiExportedMixin_1 = require("../mixins/ApiExportedMixin");
const ApiAbstractMixin_1 = require("../mixins/ApiAbstractMixin");
/**
* Represents a TypeScript class declaration.
*
* @remarks
*
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
* API declarations.
*
* `ApiClass` represents a TypeScript declaration such as this:
*
* ```ts
* export class X { }
* ```
*
* @public
*/
class ApiClass extends (0, ApiItemContainerMixin_1.ApiItemContainerMixin)((0, ApiNameMixin_1.ApiNameMixin)((0, ApiAbstractMixin_1.ApiAbstractMixin)((0, ApiTypeParameterListMixin_1.ApiTypeParameterListMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiExportedMixin_1.ApiExportedMixin)(ApiDeclaredItem_1.ApiDeclaredItem)))))) {
constructor(options) {
super(options);
this._implementsTypes = [];
if (options.extendsTokenRange) {
this.extendsType = new HeritageType_1.HeritageType(this.buildExcerpt(options.extendsTokenRange));
}
else {
this.extendsType = undefined;
}
for (const implementsTokenRange of options.implementsTokenRanges) {
this._implementsTypes.push(new HeritageType_1.HeritageType(this.buildExcerpt(implementsTokenRange)));
}
}
static getContainerKey(name) {
return `${name}|${ApiItem_1.ApiItemKind.Class}`;
}
/** @override */
static onDeserializeInto(options, context, jsonObject) {
super.onDeserializeInto(options, context, jsonObject);
options.extendsTokenRange = jsonObject.extendsTokenRange;
options.implementsTokenRanges = jsonObject.implementsTokenRanges;
}
/** @override */
get kind() {
return ApiItem_1.ApiItemKind.Class;
}
/** @override */
get containerKey() {
return ApiClass.getContainerKey(this.name);
}
/**
* The list of interfaces that this class implements using the `implements` keyword.
*/
get implementsTypes() {
return this._implementsTypes;
}
/** @override */
serializeInto(jsonObject) {
super.serializeInto(jsonObject);
// Note that JSON does not support the "undefined" value, so we simply omit the field entirely if it is undefined
if (this.extendsType) {
jsonObject.extendsTokenRange = this.extendsType.excerpt.tokenRange;
}
jsonObject.implementsTokenRanges = this.implementsTypes.map((x) => x.excerpt.tokenRange);
}
/** @beta @override */
buildCanonicalReference() {
const nameComponent = DeclarationReference_1.DeclarationReference.parseComponent(this.name);
const navigation = this.isExported ? DeclarationReference_1.Navigation.Exports : DeclarationReference_1.Navigation.Locals;
return (this.parent ? this.parent.canonicalReference : DeclarationReference_1.DeclarationReference.empty())
.addNavigationStep(navigation, nameComponent)
.withMeaning(DeclarationReference_1.Meaning.Class);
}
}
exports.ApiClass = ApiClass;
//# sourceMappingURL=ApiClass.js.map
\ No newline at end of file
{"version":3,"file":"ApiClass.js","sourceRoot":"","sources":["../../src/model/ApiClass.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AAEjE,8CAA+C;AAC/C,8DAIkC;AAClC,2EAA4G;AAC5G,qEAAmG;AAEnG,iDAA8C;AAC9C,yDAAiF;AACjF,mFAI6C;AAE7C,iEAIoC;AACpC,iEAIoC;AA2BpC;;;;;;;;;;;;;;;GAeG;AACH,MAAa,QAAS,SAAQ,IAAA,6CAAqB,EACjD,IAAA,2BAAY,EACV,IAAA,mCAAgB,EAAC,IAAA,qDAAyB,EAAC,IAAA,uCAAkB,EAAC,IAAA,mCAAgB,EAAC,iCAAe,CAAC,CAAC,CAAC,CAAC,CACnG,CACF;IAQC,YAAmB,OAAyB;QAC1C,KAAK,CAAC,OAAO,CAAC,CAAC;QAHA,qBAAgB,GAAmB,EAAE,CAAC;QAKrD,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;YAC9B,IAAI,CAAC,WAAW,GAAG,IAAI,2BAAY,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACpF,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAC/B,CAAC;QAED,KAAK,MAAM,oBAAoB,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;YACjE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,2BAAY,CAAC,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;QACxF,CAAC;IACH,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,KAAK,EAAE,CAAC;IACxC,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,iBAAiB,CAC7B,OAAkC,EAClC,OAA4B,EAC5B,UAAyB;QAEzB,KAAK,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAEtD,OAAO,CAAC,iBAAiB,GAAG,UAAU,CAAC,iBAAiB,CAAC;QACzD,OAAO,CAAC,qBAAqB,GAAG,UAAU,CAAC,qBAAqB,CAAC;IACnE,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,KAAK,CAAC;IAC3B,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAED;;OAEG;IACH,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED,gBAAgB;IACT,aAAa,CAAC,UAAkC;QACrD,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAEhC,iHAAiH;QACjH,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,UAAU,CAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC;QACrE,CAAC;QAED,UAAU,CAAC,qBAAqB,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC3F,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,KAAK,CAAC,CAAC;IAChC,CAAC;CACF;AA/ED,4BA+EC","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 { ApiItemContainerMixin, type IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\nimport { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport type { IExcerptTokenRange } from '../mixins/Excerpt';\nimport { HeritageType } from './HeritageType';\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';\nimport {\n ApiAbstractMixin,\n type IApiAbstractMixinJson,\n type IApiAbstractMixinOptions\n} from '../mixins/ApiAbstractMixin';\n\n/**\n * Constructor options for {@link ApiClass}.\n * @public\n */\nexport interface IApiClassOptions\n extends IApiItemContainerMixinOptions,\n IApiNameMixinOptions,\n IApiAbstractMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiTypeParameterListMixinOptions,\n IApiExportedMixinOptions {\n extendsTokenRange: IExcerptTokenRange | undefined;\n implementsTokenRanges: IExcerptTokenRange[];\n}\n\nexport interface IApiClassJson\n extends IApiDeclaredItemJson,\n IApiAbstractMixinJson,\n IApiTypeParameterListMixinJson,\n IApiExportedMixinJson {\n extendsTokenRange?: IExcerptTokenRange;\n implementsTokenRanges: IExcerptTokenRange[];\n}\n\n/**\n * Represents a TypeScript class 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 * `ApiClass` represents a TypeScript declaration such as this:\n *\n * ```ts\n * export class X { }\n * ```\n *\n * @public\n */\nexport class ApiClass extends ApiItemContainerMixin(\n ApiNameMixin(\n ApiAbstractMixin(ApiTypeParameterListMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem))))\n )\n) {\n /**\n * The base class that this class inherits from (using the `extends` keyword), or undefined if there is no base class.\n */\n public readonly extendsType: HeritageType | undefined;\n\n private readonly _implementsTypes: HeritageType[] = [];\n\n public constructor(options: IApiClassOptions) {\n super(options);\n\n if (options.extendsTokenRange) {\n this.extendsType = new HeritageType(this.buildExcerpt(options.extendsTokenRange));\n } else {\n this.extendsType = undefined;\n }\n\n for (const implementsTokenRange of options.implementsTokenRanges) {\n this._implementsTypes.push(new HeritageType(this.buildExcerpt(implementsTokenRange)));\n }\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.Class}`;\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiClassOptions>,\n context: DeserializerContext,\n jsonObject: IApiClassJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.extendsTokenRange = jsonObject.extendsTokenRange;\n options.implementsTokenRanges = jsonObject.implementsTokenRanges;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Class;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiClass.getContainerKey(this.name);\n }\n\n /**\n * The list of interfaces that this class implements using the `implements` keyword.\n */\n public get implementsTypes(): ReadonlyArray<HeritageType> {\n return this._implementsTypes;\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiClassJson>): void {\n super.serializeInto(jsonObject);\n\n // Note that JSON does not support the \"undefined\" value, so we simply omit the field entirely if it is undefined\n if (this.extendsType) {\n jsonObject.extendsTokenRange = this.extendsType.excerpt.tokenRange;\n }\n\n jsonObject.implementsTokenRanges = this.implementsTypes.map((x) => x.excerpt.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.Class);\n }\n}\n"]}
\ No newline at end of file
import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
import { ApiItemKind } from '../items/ApiItem';
import { type IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';
import { type IApiParameterListMixinOptions, ApiParameterListMixin } from '../mixins/ApiParameterListMixin';
import { type IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';
import { type IApiReturnTypeMixinOptions, ApiReturnTypeMixin } from '../mixins/ApiReturnTypeMixin';
import { ApiTypeParameterListMixin, type IApiTypeParameterListMixinOptions } from '../mixins/ApiTypeParameterListMixin';
/**
* Constructor options for {@link ApiConstructor}.
* @public
*/
export interface IApiConstructSignatureOptions extends IApiTypeParameterListMixinOptions, IApiParameterListMixinOptions, IApiReleaseTagMixinOptions, IApiReturnTypeMixinOptions, IApiDeclaredItemOptions {
}
declare const ApiConstructSignature_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReturnTypeMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiParameterListMixin) & (new (...args: any[]) => ApiTypeParameterListMixin);
/**
* Represents a TypeScript construct signature that belongs to an `ApiInterface`.
*
* @remarks
*
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
* API declarations.
*
* `ApiConstructSignature` represents a construct signature using the `new` keyword such as in this example:
*
* ```ts
* export interface IVector {
* x: number;
* y: number;
* }
*
* export interface IVectorConstructor {
* // A construct signature:
* new(x: number, y: number): IVector;
* }
*
* export function createVector(vectorConstructor: IVectorConstructor,
* x: number, y: number): IVector {
* return new vectorConstructor(x, y);
* }
*
* class Vector implements IVector {
* public x: number;
* public y: number;
* public constructor(x: number, y: number) {
* this.x = x;
* this.y = y;
* }
* }
*
* let vector: Vector = createVector(Vector, 1, 2);
* ```
*
* Compare with {@link ApiConstructor}, which describes the class constructor itself.
*
* @public
*/
export declare class ApiConstructSignature extends ApiConstructSignature_base {
constructor(options: IApiConstructSignatureOptions);
static getContainerKey(overloadIndex: number): string;
/** @override */
get kind(): ApiItemKind;
/** @override */
get containerKey(): string;
/** @beta @override */
buildCanonicalReference(): DeclarationReference;
}
export {};
//# sourceMappingURL=ApiConstructSignature.d.ts.map
\ No newline at end of file
{"version":3,"file":"ApiConstructSignature.d.ts","sourceRoot":"","sources":["../../src/model/ApiConstructSignature.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAGrB,MAAM,yDAAyD,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,KAAK,uBAAuB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAE,KAAK,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC5G,OAAO,EAAE,KAAK,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAAE,KAAK,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,EACL,yBAAyB,EACzB,KAAK,iCAAiC,EACvC,MAAM,qCAAqC,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,6BACf,SAAQ,iCAAiC,EACvC,6BAA6B,EAC7B,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB;CAAG;;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,qBAAa,qBAAsB,SAAQ,0BAE1C;gBACoB,OAAO,EAAE,6BAA6B;WAI3C,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM;IAI5D,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAOvD"}
\ No newline at end of file
"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiConstructSignature = void 0;
const DeclarationReference_1 = require("@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference");
const ApiItem_1 = require("../items/ApiItem");
const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
const ApiParameterListMixin_1 = require("../mixins/ApiParameterListMixin");
const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
const ApiReturnTypeMixin_1 = require("../mixins/ApiReturnTypeMixin");
const ApiTypeParameterListMixin_1 = require("../mixins/ApiTypeParameterListMixin");
/**
* Represents a TypeScript construct signature that belongs to an `ApiInterface`.
*
* @remarks
*
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
* API declarations.
*
* `ApiConstructSignature` represents a construct signature using the `new` keyword such as in this example:
*
* ```ts
* export interface IVector {
* x: number;
* y: number;
* }
*
* export interface IVectorConstructor {
* // A construct signature:
* new(x: number, y: number): IVector;
* }
*
* export function createVector(vectorConstructor: IVectorConstructor,
* x: number, y: number): IVector {
* return new vectorConstructor(x, y);
* }
*
* class Vector implements IVector {
* public x: number;
* public y: number;
* public constructor(x: number, y: number) {
* this.x = x;
* this.y = y;
* }
* }
*
* let vector: Vector = createVector(Vector, 1, 2);
* ```
*
* Compare with {@link ApiConstructor}, which describes the class constructor itself.
*
* @public
*/
class ApiConstructSignature extends (0, ApiTypeParameterListMixin_1.ApiTypeParameterListMixin)((0, ApiParameterListMixin_1.ApiParameterListMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiReturnTypeMixin_1.ApiReturnTypeMixin)(ApiDeclaredItem_1.ApiDeclaredItem)))) {
constructor(options) {
super(options);
}
static getContainerKey(overloadIndex) {
return `|${ApiItem_1.ApiItemKind.ConstructSignature}|${overloadIndex}`;
}
/** @override */
get kind() {
return ApiItem_1.ApiItemKind.ConstructSignature;
}
/** @override */
get containerKey() {
return ApiConstructSignature.getContainerKey(this.overloadIndex);
}
/** @beta @override */
buildCanonicalReference() {
const parent = this.parent
? this.parent.canonicalReference
: // .withMeaning() requires some kind of component
DeclarationReference_1.DeclarationReference.empty().addNavigationStep(DeclarationReference_1.Navigation.Members, '(parent)');
return parent.withMeaning(DeclarationReference_1.Meaning.ConstructSignature).withOverloadIndex(this.overloadIndex);
}
}
exports.ApiConstructSignature = ApiConstructSignature;
//# sourceMappingURL=ApiConstructSignature.js.map
\ No newline at end of file
{"version":3,"file":"ApiConstructSignature.js","sourceRoot":"","sources":["../../src/model/ApiConstructSignature.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAIiE;AAEjE,8CAA+C;AAC/C,8DAAyF;AACzF,2EAA4G;AAC5G,qEAAmG;AACnG,qEAAmG;AACnG,mFAG6C;AAa7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAa,qBAAsB,SAAQ,IAAA,qDAAyB,EAClE,IAAA,6CAAqB,EAAC,IAAA,uCAAkB,EAAC,IAAA,uCAAkB,EAAC,iCAAe,CAAC,CAAC,CAAC,CAC/E;IACC,YAAmB,OAAsC;QACvD,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,aAAqB;QACjD,OAAO,IAAI,qBAAW,CAAC,kBAAkB,IAAI,aAAa,EAAE,CAAC;IAC/D,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,kBAAkB,CAAC;IACxC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,qBAAqB,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACnE,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,CAAC,iCAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACnF,OAAO,MAAM,CAAC,WAAW,CAAC,8BAAO,CAAC,kBAAkB,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC9F,CAAC;CACF;AA7BD,sDA6BC","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';\n\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 {\n ApiTypeParameterListMixin,\n type IApiTypeParameterListMixinOptions\n} from '../mixins/ApiTypeParameterListMixin';\n\n/**\n * Constructor options for {@link ApiConstructor}.\n * @public\n */\nexport interface IApiConstructSignatureOptions\n extends IApiTypeParameterListMixinOptions,\n IApiParameterListMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiReturnTypeMixinOptions,\n IApiDeclaredItemOptions {}\n\n/**\n * Represents a TypeScript construct signature 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 * `ApiConstructSignature` represents a construct signature using the `new` keyword such as in this example:\n *\n * ```ts\n * export interface IVector {\n * x: number;\n * y: number;\n * }\n *\n * export interface IVectorConstructor {\n * // A construct signature:\n * new(x: number, y: number): IVector;\n * }\n *\n * export function createVector(vectorConstructor: IVectorConstructor,\n * x: number, y: number): IVector {\n * return new vectorConstructor(x, y);\n * }\n *\n * class Vector implements IVector {\n * public x: number;\n * public y: number;\n * public constructor(x: number, y: number) {\n * this.x = x;\n * this.y = y;\n * }\n * }\n *\n * let vector: Vector = createVector(Vector, 1, 2);\n * ```\n *\n * Compare with {@link ApiConstructor}, which describes the class constructor itself.\n *\n * @public\n */\nexport class ApiConstructSignature extends ApiTypeParameterListMixin(\n ApiParameterListMixin(ApiReleaseTagMixin(ApiReturnTypeMixin(ApiDeclaredItem)))\n) {\n public constructor(options: IApiConstructSignatureOptions) {\n super(options);\n }\n\n public static getContainerKey(overloadIndex: number): string {\n return `|${ApiItemKind.ConstructSignature}|${overloadIndex}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.ConstructSignature;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiConstructSignature.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.ConstructSignature).withOverloadIndex(this.overloadIndex);\n }\n}\n"]}
\ No newline at end of file
import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
import { ApiItemKind } from '../items/ApiItem';
import { type IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';
import { type IApiParameterListMixinOptions, ApiParameterListMixin } from '../mixins/ApiParameterListMixin';
import { ApiProtectedMixin, type IApiProtectedMixinOptions } from '../mixins/ApiProtectedMixin';
import { type IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';
/**
* Constructor options for {@link ApiConstructor}.
* @public
*/
export interface IApiConstructorOptions extends IApiParameterListMixinOptions, IApiProtectedMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions {
}
declare const ApiConstructor_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiProtectedMixin) & (new (...args: any[]) => ApiParameterListMixin);
/**
* Represents a TypeScript class constructor declaration that belongs to an `ApiClass`.
*
* @remarks
*
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
* API declarations.
*
* `ApiConstructor` represents a declaration using the `constructor` keyword such as in this example:
*
* ```ts
* export class Vector {
* public x: number;
* public y: number;
*
* // A class constructor:
* public constructor(x: number, y: number) {
* this.x = x;
* this.y = y;
* }
* }
* ```
*
* Compare with {@link ApiConstructSignature}, which describes the construct signature for a class constructor.
*
* @public
*/
export declare class ApiConstructor extends ApiConstructor_base {
constructor(options: IApiConstructorOptions);
static getContainerKey(overloadIndex: number): string;
/** @override */
get kind(): ApiItemKind;
/** @override */
get containerKey(): string;
/** @beta @override */
buildCanonicalReference(): DeclarationReference;
}
export {};
//# sourceMappingURL=ApiConstructor.d.ts.map
\ No newline at end of file
{"version":3,"file":"ApiConstructor.d.ts","sourceRoot":"","sources":["../../src/model/ApiConstructor.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAGrB,MAAM,yDAAyD,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,KAAK,uBAAuB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAE,KAAK,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC5G,OAAO,EAAE,iBAAiB,EAAE,KAAK,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAChG,OAAO,EAAE,KAAK,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEnG;;;GAGG;AACH,MAAM,WAAW,sBACf,SAAQ,6BAA6B,EACnC,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB;CAAG;;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,cAAe,SAAQ,mBAEnC;gBACoB,OAAO,EAAE,sBAAsB;WAIpC,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM;IAI5D,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAOvD"}
\ No newline at end of file
"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiConstructor = void 0;
const DeclarationReference_1 = require("@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference");
const ApiItem_1 = require("../items/ApiItem");
const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
const ApiParameterListMixin_1 = require("../mixins/ApiParameterListMixin");
const ApiProtectedMixin_1 = require("../mixins/ApiProtectedMixin");
const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
/**
* Represents a TypeScript class constructor declaration that belongs to an `ApiClass`.
*
* @remarks
*
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
* API declarations.
*
* `ApiConstructor` represents a declaration using the `constructor` keyword such as in this example:
*
* ```ts
* export class Vector {
* public x: number;
* public y: number;
*
* // A class constructor:
* public constructor(x: number, y: number) {
* this.x = x;
* this.y = y;
* }
* }
* ```
*
* Compare with {@link ApiConstructSignature}, which describes the construct signature for a class constructor.
*
* @public
*/
class ApiConstructor extends (0, ApiParameterListMixin_1.ApiParameterListMixin)((0, ApiProtectedMixin_1.ApiProtectedMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)(ApiDeclaredItem_1.ApiDeclaredItem))) {
constructor(options) {
super(options);
}
static getContainerKey(overloadIndex) {
return `|${ApiItem_1.ApiItemKind.Constructor}|${overloadIndex}`;
}
/** @override */
get kind() {
return ApiItem_1.ApiItemKind.Constructor;
}
/** @override */
get containerKey() {
return ApiConstructor.getContainerKey(this.overloadIndex);
}
/** @beta @override */
buildCanonicalReference() {
const parent = this.parent
? this.parent.canonicalReference
: // .withMeaning() requires some kind of component
DeclarationReference_1.DeclarationReference.empty().addNavigationStep(DeclarationReference_1.Navigation.Members, '(parent)');
return parent.withMeaning(DeclarationReference_1.Meaning.Constructor).withOverloadIndex(this.overloadIndex);
}
}
exports.ApiConstructor = ApiConstructor;
//# sourceMappingURL=ApiConstructor.js.map
\ No newline at end of file
{"version":3,"file":"ApiConstructor.js","sourceRoot":"","sources":["../../src/model/ApiConstructor.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAIiE;AAEjE,8CAA+C;AAC/C,8DAAyF;AACzF,2EAA4G;AAC5G,mEAAgG;AAChG,qEAAmG;AAYnG;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAa,cAAe,SAAQ,IAAA,6CAAqB,EACvD,IAAA,qCAAiB,EAAC,IAAA,uCAAkB,EAAC,iCAAe,CAAC,CAAC,CACvD;IACC,YAAmB,OAA+B;QAChD,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,aAAqB;QACjD,OAAO,IAAI,qBAAW,CAAC,WAAW,IAAI,aAAa,EAAE,CAAC;IACxD,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,WAAW,CAAC;IACjC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,cAAc,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC5D,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,CAAC,iCAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACnF,OAAO,MAAM,CAAC,WAAW,CAAC,8BAAO,CAAC,WAAW,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACvF,CAAC;CACF;AA7BD,wCA6BC","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';\n\nimport { ApiItemKind } from '../items/ApiItem';\nimport { type IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';\nimport { type IApiParameterListMixinOptions, ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\nimport { ApiProtectedMixin, type IApiProtectedMixinOptions } from '../mixins/ApiProtectedMixin';\nimport { type IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';\n\n/**\n * Constructor options for {@link ApiConstructor}.\n * @public\n */\nexport interface IApiConstructorOptions\n extends IApiParameterListMixinOptions,\n IApiProtectedMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions {}\n\n/**\n * Represents a TypeScript class constructor 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 * `ApiConstructor` represents a declaration using the `constructor` keyword such as in this example:\n *\n * ```ts\n * export class Vector {\n * public x: number;\n * public y: number;\n *\n * // A class constructor:\n * public constructor(x: number, y: number) {\n * this.x = x;\n * this.y = y;\n * }\n * }\n * ```\n *\n * Compare with {@link ApiConstructSignature}, which describes the construct signature for a class constructor.\n *\n * @public\n */\nexport class ApiConstructor extends ApiParameterListMixin(\n ApiProtectedMixin(ApiReleaseTagMixin(ApiDeclaredItem))\n) {\n public constructor(options: IApiConstructorOptions) {\n super(options);\n }\n\n public static getContainerKey(overloadIndex: number): string {\n return `|${ApiItemKind.Constructor}|${overloadIndex}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Constructor;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiConstructor.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.Constructor).withOverloadIndex(this.overloadIndex);\n }\n}\n"]}
\ No newline at end of file
import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
import { ApiItem, ApiItemKind } from '../items/ApiItem';
import { ApiItemContainerMixin, type IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';
import { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
/**
* Constructor options for {@link ApiEntryPoint}.
* @public
*/
export interface IApiEntryPointOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions {
}
declare const ApiEntryPoint_base: typeof ApiItem & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
/**
* Represents the entry point for an NPM package.
*
* @remarks
*
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
* API declarations.
*
* `ApiEntryPoint` represents the entry point to an NPM package. API Extractor does not currently support
* analysis of multiple entry points, but the `ApiEntryPoint` object is included to support a future feature.
* In the current implementation, `ApiEntryPoint.importPath` is always the empty string.
*
* For example, suppose the package.json file looks like this:
*
* ```json
* {
* "name": "example-library",
* "version": "1.0.0",
* "main": "./lib/index.js",
* "typings": "./lib/index.d.ts"
* }
* ```
*
* In this example, the `ApiEntryPoint` would represent the TypeScript module for `./lib/index.js`.
*
* @public
*/
export declare class ApiEntryPoint extends ApiEntryPoint_base {
constructor(options: IApiEntryPointOptions);
/** @override */
get kind(): ApiItemKind;
/** @override */
get containerKey(): string;
/**
* The module path for this entry point, relative to the parent `ApiPackage`. In the current implementation,
* this is always the empty string, indicating the default entry point.
*
* @remarks
*
* API Extractor does not currently support analysis of multiple entry points. If that feature is implemented
* in the future, then the `ApiEntryPoint.importPath` will be used to distinguish different entry points,
* for example: `controls/Button` in `import { Button } from "example-package/controls/Button";`.
*
* The `ApiEntryPoint.name` property stores the same value as `ApiEntryPoint.importPath`.
*/
get importPath(): string;
/** @beta @override */
buildCanonicalReference(): DeclarationReference;
}
export {};
//# sourceMappingURL=ApiEntryPoint.d.ts.map
\ No newline at end of file
{"version":3,"file":"ApiEntryPoint.d.ts","sourceRoot":"","sources":["../../src/model/ApiEntryPoint.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yDAAyD,CAAC;AAE/F,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,KAAK,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAC5G,OAAO,EAAE,KAAK,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGjF;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,6BAA6B,EAAE,oBAAoB;CAAG;;AAErG;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,aAAc,SAAQ,kBAA4C;gBAC1D,OAAO,EAAE,qBAAqB;IAIjD,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAGhC;IAED;;;;;;;;;;;OAWG;IACH,IAAW,UAAU,IAAI,MAAM,CAE9B;IAED,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAOvD"}
\ No newline at end of file
"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiEntryPoint = void 0;
const DeclarationReference_1 = require("@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference");
const ApiItem_1 = require("../items/ApiItem");
const ApiItemContainerMixin_1 = require("../mixins/ApiItemContainerMixin");
const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
const ApiPackage_1 = require("./ApiPackage");
/**
* Represents the entry point for an NPM package.
*
* @remarks
*
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
* API declarations.
*
* `ApiEntryPoint` represents the entry point to an NPM package. API Extractor does not currently support
* analysis of multiple entry points, but the `ApiEntryPoint` object is included to support a future feature.
* In the current implementation, `ApiEntryPoint.importPath` is always the empty string.
*
* For example, suppose the package.json file looks like this:
*
* ```json
* {
* "name": "example-library",
* "version": "1.0.0",
* "main": "./lib/index.js",
* "typings": "./lib/index.d.ts"
* }
* ```
*
* In this example, the `ApiEntryPoint` would represent the TypeScript module for `./lib/index.js`.
*
* @public
*/
class ApiEntryPoint extends (0, ApiItemContainerMixin_1.ApiItemContainerMixin)((0, ApiNameMixin_1.ApiNameMixin)(ApiItem_1.ApiItem)) {
constructor(options) {
super(options);
}
/** @override */
get kind() {
return ApiItem_1.ApiItemKind.EntryPoint;
}
/** @override */
get containerKey() {
// No prefix needed, because ApiEntryPoint is the only possible member of an ApiPackage
return this.name;
}
/**
* The module path for this entry point, relative to the parent `ApiPackage`. In the current implementation,
* this is always the empty string, indicating the default entry point.
*
* @remarks
*
* API Extractor does not currently support analysis of multiple entry points. If that feature is implemented
* in the future, then the `ApiEntryPoint.importPath` will be used to distinguish different entry points,
* for example: `controls/Button` in `import { Button } from "example-package/controls/Button";`.
*
* The `ApiEntryPoint.name` property stores the same value as `ApiEntryPoint.importPath`.
*/
get importPath() {
return this.name;
}
/** @beta @override */
buildCanonicalReference() {
if (this.parent instanceof ApiPackage_1.ApiPackage) {
return DeclarationReference_1.DeclarationReference.package(this.parent.name, this.importPath);
}
return DeclarationReference_1.DeclarationReference.empty();
}
}
exports.ApiEntryPoint = ApiEntryPoint;
//# sourceMappingURL=ApiEntryPoint.js.map
\ No newline at end of file
{"version":3,"file":"ApiEntryPoint.js","sourceRoot":"","sources":["../../src/model/ApiEntryPoint.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAA+F;AAE/F,8CAAwD;AACxD,2EAA4G;AAC5G,yDAAiF;AACjF,6CAA0C;AAQ1C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAa,aAAc,SAAQ,IAAA,6CAAqB,EAAC,IAAA,2BAAY,EAAC,iBAAO,CAAC,CAAC;IAC7E,YAAmB,OAA8B;QAC/C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,UAAU,CAAC;IAChC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,uFAAuF;QACvF,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,IAAI,IAAI,CAAC,MAAM,YAAY,uBAAU,EAAE,CAAC;YACtC,OAAO,2CAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACzE,CAAC;QAED,OAAO,2CAAoB,CAAC,KAAK,EAAE,CAAC;IACtC,CAAC;CACF;AAxCD,sCAwCC","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';\n\nimport { ApiItem, ApiItemKind } from '../items/ApiItem';\nimport { ApiItemContainerMixin, type IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { ApiPackage } from './ApiPackage';\n\n/**\n * Constructor options for {@link ApiEntryPoint}.\n * @public\n */\nexport interface IApiEntryPointOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions {}\n\n/**\n * Represents the entry point for an NPM package.\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 * `ApiEntryPoint` represents the entry point to an NPM package. API Extractor does not currently support\n * analysis of multiple entry points, but the `ApiEntryPoint` object is included to support a future feature.\n * In the current implementation, `ApiEntryPoint.importPath` is always the empty string.\n *\n * For example, suppose the package.json file looks like this:\n *\n * ```json\n * {\n * \"name\": \"example-library\",\n * \"version\": \"1.0.0\",\n * \"main\": \"./lib/index.js\",\n * \"typings\": \"./lib/index.d.ts\"\n * }\n * ```\n *\n * In this example, the `ApiEntryPoint` would represent the TypeScript module for `./lib/index.js`.\n *\n * @public\n */\nexport class ApiEntryPoint extends ApiItemContainerMixin(ApiNameMixin(ApiItem)) {\n public constructor(options: IApiEntryPointOptions) {\n super(options);\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.EntryPoint;\n }\n\n /** @override */\n public get containerKey(): string {\n // No prefix needed, because ApiEntryPoint is the only possible member of an ApiPackage\n return this.name;\n }\n\n /**\n * The module path for this entry point, relative to the parent `ApiPackage`. In the current implementation,\n * this is always the empty string, indicating the default entry point.\n *\n * @remarks\n *\n * API Extractor does not currently support analysis of multiple entry points. If that feature is implemented\n * in the future, then the `ApiEntryPoint.importPath` will be used to distinguish different entry points,\n * for example: `controls/Button` in `import { Button } from \"example-package/controls/Button\";`.\n *\n * The `ApiEntryPoint.name` property stores the same value as `ApiEntryPoint.importPath`.\n */\n public get importPath(): string {\n return this.name;\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n if (this.parent instanceof ApiPackage) {\n return DeclarationReference.package(this.parent.name, this.importPath);\n }\n\n return DeclarationReference.empty();\n }\n}\n"]}
\ No newline at end of file
import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
import { ApiItemKind } from '../items/ApiItem';
import { ApiDeclaredItem, type IApiDeclaredItemOptions } from '../items/ApiDeclaredItem';
import { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';
import { ApiItemContainerMixin, type IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';
import type { ApiEnumMember } from './ApiEnumMember';
import { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
import { type IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';
/**
* Constructor options for {@link ApiEnum}.
* @public
*/
export interface IApiEnumOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiExportedMixinOptions {
}
declare const ApiEnum_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
/**
* Represents a TypeScript enum declaration.
*
* @remarks
*
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
* API declarations.
*
* `ApiEnum` represents an enum declaration such as `FontSizes` in the example below:
*
* ```ts
* export enum FontSizes {
* Small = 100,
* Medium = 200,
* Large = 300
* }
* ```
*
* @public
*/
export declare class ApiEnum extends ApiEnum_base {
constructor(options: IApiEnumOptions);
static getContainerKey(name: string): string;
/** @override */
get kind(): ApiItemKind;
/** @override */
get members(): ReadonlyArray<ApiEnumMember>;
/** @override */
get containerKey(): string;
/** @override */
addMember(member: ApiEnumMember): void;
/** @beta @override */
buildCanonicalReference(): DeclarationReference;
}
export {};
//# sourceMappingURL=ApiEnum.d.ts.map
\ No newline at end of file
{"version":3,"file":"ApiEnum.d.ts","sourceRoot":"","sources":["../../src/model/ApiEnum.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;AACzF,OAAO,EAAE,kBAAkB,EAAE,KAAK,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAAE,qBAAqB,EAAE,KAAK,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAC5G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,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,eACf,SAAQ,6BAA6B,EACnC,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB;CAAG;;AAE/B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,OAAQ,SAAQ,YAE5B;gBACoB,OAAO,EAAE,eAAe;WAI7B,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAInD,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,OAAO,IAAI,aAAa,CAAC,aAAa,CAAC,CAEjD;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,gBAAgB;IACT,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAO7C,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAOvD"}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment