Commit 956c501c authored by DatHV's avatar DatHV
Browse files

update build x-app-sdk

parent 9bb8aadd
"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
"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.ApiEnum = 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 ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
const ApiItemContainerMixin_1 = require("../mixins/ApiItemContainerMixin");
const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
const ApiExportedMixin_1 = require("../mixins/ApiExportedMixin");
/**
* 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
*/
class ApiEnum extends (0, ApiItemContainerMixin_1.ApiItemContainerMixin)((0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiExportedMixin_1.ApiExportedMixin)(ApiDeclaredItem_1.ApiDeclaredItem)))) {
constructor(options) {
super(options);
}
static getContainerKey(name) {
return `${name}|${ApiItem_1.ApiItemKind.Enum}`;
}
/** @override */
get kind() {
return ApiItem_1.ApiItemKind.Enum;
}
/** @override */
get members() {
return super.members;
}
/** @override */
get containerKey() {
return ApiEnum.getContainerKey(this.name);
}
/** @override */
addMember(member) {
if (member.kind !== ApiItem_1.ApiItemKind.EnumMember) {
throw new Error('Only ApiEnumMember objects can be added to an ApiEnum');
}
super.addMember(member);
}
/** @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.Enum);
}
}
exports.ApiEnum = ApiEnum;
//# sourceMappingURL=ApiEnum.js.map
\ No newline at end of file
{"version":3,"file":"ApiEnum.js","sourceRoot":"","sources":["../../src/model/ApiEnum.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AAEjE,8CAA+C;AAC/C,8DAAyF;AACzF,qEAAmG;AACnG,2EAA4G;AAE5G,yDAAiF;AACjF,iEAA6F;AAa7F;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,OAAQ,SAAQ,IAAA,6CAAqB,EAChD,IAAA,2BAAY,EAAC,IAAA,uCAAkB,EAAC,IAAA,mCAAgB,EAAC,iCAAe,CAAC,CAAC,CAAC,CACpE;IACC,YAAmB,OAAwB;QACzC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,IAAI,EAAE,CAAC;IACvC,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED,gBAAgB;IAChB,IAAW,OAAO;QAChB,OAAO,KAAK,CAAC,OAAuC,CAAC;IACvD,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,gBAAgB;IACT,SAAS,CAAC,MAAqB;QACpC,IAAI,MAAM,CAAC,IAAI,KAAK,qBAAW,CAAC,UAAU,EAAE,CAAC;YAC3C,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;QAC3E,CAAC;QACD,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC1B,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,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF;AA1CD,0BA0CC","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 { ApiDeclaredItem, type IApiDeclaredItemOptions } from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { ApiItemContainerMixin, type IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\nimport type { ApiEnumMember } from './ApiEnumMember';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { type IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiEnum}.\n * @public\n */\nexport interface IApiEnumOptions\n extends IApiItemContainerMixinOptions,\n IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiExportedMixinOptions {}\n\n/**\n * Represents a TypeScript enum 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 * `ApiEnum` represents an enum declaration such as `FontSizes` in the example below:\n *\n * ```ts\n * export enum FontSizes {\n * Small = 100,\n * Medium = 200,\n * Large = 300\n * }\n * ```\n *\n * @public\n */\nexport class ApiEnum extends ApiItemContainerMixin(\n ApiNameMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem)))\n) {\n public constructor(options: IApiEnumOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.Enum}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Enum;\n }\n\n /** @override */\n public get members(): ReadonlyArray<ApiEnumMember> {\n return super.members as ReadonlyArray<ApiEnumMember>;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiEnum.getContainerKey(this.name);\n }\n\n /** @override */\n public addMember(member: ApiEnumMember): void {\n if (member.kind !== ApiItemKind.EnumMember) {\n throw new Error('Only ApiEnumMember objects can be added to an ApiEnum');\n }\n super.addMember(member);\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.Enum);\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 { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
import { ApiInitializerMixin, type IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin';
/**
* Constructor options for {@link ApiEnumMember}.
* @public
*/
export interface IApiEnumMemberOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiInitializerMixinOptions {
}
/**
* Options for customizing the sort order of {@link ApiEnum} members.
*
* @privateRemarks
* This enum is currently only used by the `@microsoft/api-extractor` package; it is declared here
* because we anticipate that if more options are added in the future, their sorting will be implemented
* by the `@microsoft/api-extractor-model` package.
*
* See https://github.com/microsoft/rushstack/issues/918 for details.
*
* @public
*/
export declare enum EnumMemberOrder {
/**
* `ApiEnumMember` items are sorted according to their {@link ApiItem.getSortKey}. The order is
* basically alphabetical by identifier name, but otherwise unspecified to allow for cosmetic improvements.
*
* This is the default behavior.
*/
ByName = "by-name",
/**
* `ApiEnumMember` items preserve the original order of the declarations in the source file.
* (This disables the automatic sorting that is normally applied based on {@link ApiItem.getSortKey}.)
*/
Preserve = "preserve"
}
declare const ApiEnumMember_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiInitializerMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin);
/**
* Represents a member of a TypeScript enum declaration.
*
* @remarks
*
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
* API declarations.
*
* `ApiEnumMember` represents an enum member such as `Small = 100` in the example below:
*
* ```ts
* export enum FontSizes {
* Small = 100,
* Medium = 200,
* Large = 300
* }
* ```
*
* @public
*/
export declare class ApiEnumMember extends ApiEnumMember_base {
constructor(options: IApiEnumMemberOptions);
static getContainerKey(name: string): string;
/** @override */
get kind(): ApiItemKind;
/** @override */
get containerKey(): string;
/** @beta @override */
buildCanonicalReference(): DeclarationReference;
}
export {};
//# sourceMappingURL=ApiEnumMember.d.ts.map
\ No newline at end of file
{"version":3,"file":"ApiEnumMember.d.ts","sourceRoot":"","sources":["../../src/model/ApiEnumMember.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,KAAK,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,KAAK,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEtG;;;GAGG;AACH,MAAM,WAAW,qBACf,SAAQ,oBAAoB,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,2BAA2B;CAAG;AAElC;;;;;;;;;;;GAWG;AACH,oBAAY,eAAe;IACzB;;;;;OAKG;IACH,MAAM,YAAY;IAElB;;;OAGG;IACH,QAAQ,aAAa;CACtB;;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,aAAc,SAAQ,kBAAsE;gBACpF,OAAO,EAAE,qBAAqB;WAInC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAKnD,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAMvD"}
\ 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.ApiEnumMember = exports.EnumMemberOrder = 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 ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
const ApiInitializerMixin_1 = require("../mixins/ApiInitializerMixin");
/**
* Options for customizing the sort order of {@link ApiEnum} members.
*
* @privateRemarks
* This enum is currently only used by the `@microsoft/api-extractor` package; it is declared here
* because we anticipate that if more options are added in the future, their sorting will be implemented
* by the `@microsoft/api-extractor-model` package.
*
* See https://github.com/microsoft/rushstack/issues/918 for details.
*
* @public
*/
var EnumMemberOrder;
(function (EnumMemberOrder) {
/**
* `ApiEnumMember` items are sorted according to their {@link ApiItem.getSortKey}. The order is
* basically alphabetical by identifier name, but otherwise unspecified to allow for cosmetic improvements.
*
* This is the default behavior.
*/
EnumMemberOrder["ByName"] = "by-name";
/**
* `ApiEnumMember` items preserve the original order of the declarations in the source file.
* (This disables the automatic sorting that is normally applied based on {@link ApiItem.getSortKey}.)
*/
EnumMemberOrder["Preserve"] = "preserve";
})(EnumMemberOrder || (exports.EnumMemberOrder = EnumMemberOrder = {}));
/**
* Represents a member of a TypeScript enum declaration.
*
* @remarks
*
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
* API declarations.
*
* `ApiEnumMember` represents an enum member such as `Small = 100` in the example below:
*
* ```ts
* export enum FontSizes {
* Small = 100,
* Medium = 200,
* Large = 300
* }
* ```
*
* @public
*/
class ApiEnumMember extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiInitializerMixin_1.ApiInitializerMixin)(ApiDeclaredItem_1.ApiDeclaredItem))) {
constructor(options) {
super(options);
}
static getContainerKey(name) {
// No prefix needed, because ApiEnumMember is the only possible member of an ApiEnum
return name;
}
/** @override */
get kind() {
return ApiItem_1.ApiItemKind.EnumMember;
}
/** @override */
get containerKey() {
return ApiEnumMember.getContainerKey(this.name);
}
/** @beta @override */
buildCanonicalReference() {
const nameComponent = DeclarationReference_1.DeclarationReference.parseComponent(this.name);
return (this.parent ? this.parent.canonicalReference : DeclarationReference_1.DeclarationReference.empty())
.addNavigationStep(DeclarationReference_1.Navigation.Exports, nameComponent)
.withMeaning(DeclarationReference_1.Meaning.Member);
}
}
exports.ApiEnumMember = ApiEnumMember;
//# sourceMappingURL=ApiEnumMember.js.map
\ No newline at end of file
{"version":3,"file":"ApiEnumMember.js","sourceRoot":"","sources":["../../src/model/ApiEnumMember.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AAEjE,8CAA+C;AAC/C,8DAAyF;AACzF,qEAAmG;AACnG,yDAAiF;AACjF,uEAAsG;AAYtG;;;;;;;;;;;GAWG;AACH,IAAY,eAcX;AAdD,WAAY,eAAe;IACzB;;;;;OAKG;IACH,qCAAkB,CAAA;IAElB;;;OAGG;IACH,wCAAqB,CAAA;AACvB,CAAC,EAdW,eAAe,+BAAf,eAAe,QAc1B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,aAAc,SAAQ,IAAA,2BAAY,EAAC,IAAA,uCAAkB,EAAC,IAAA,yCAAmB,EAAC,iCAAe,CAAC,CAAC,CAAC;IACvG,YAAmB,OAA8B;QAC/C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,oFAAoF;QACpF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,UAAU,CAAC;IAChC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,aAAa,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClD,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;AA3BD,sCA2BC","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 { ApiDeclaredItem, type IApiDeclaredItemOptions } from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { ApiInitializerMixin, type IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin';\n\n/**\n * Constructor options for {@link ApiEnumMember}.\n * @public\n */\nexport interface IApiEnumMemberOptions\n extends IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiInitializerMixinOptions {}\n\n/**\n * Options for customizing the sort order of {@link ApiEnum} members.\n *\n * @privateRemarks\n * This enum is currently only used by the `@microsoft/api-extractor` package; it is declared here\n * because we anticipate that if more options are added in the future, their sorting will be implemented\n * by the `@microsoft/api-extractor-model` package.\n *\n * See https://github.com/microsoft/rushstack/issues/918 for details.\n *\n * @public\n */\nexport enum EnumMemberOrder {\n /**\n * `ApiEnumMember` items are sorted according to their {@link ApiItem.getSortKey}. The order is\n * basically alphabetical by identifier name, but otherwise unspecified to allow for cosmetic improvements.\n *\n * This is the default behavior.\n */\n ByName = 'by-name',\n\n /**\n * `ApiEnumMember` items preserve the original order of the declarations in the source file.\n * (This disables the automatic sorting that is normally applied based on {@link ApiItem.getSortKey}.)\n */\n Preserve = 'preserve'\n}\n\n/**\n * Represents a member of a TypeScript enum 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 * `ApiEnumMember` represents an enum member such as `Small = 100` in the example below:\n *\n * ```ts\n * export enum FontSizes {\n * Small = 100,\n * Medium = 200,\n * Large = 300\n * }\n * ```\n *\n * @public\n */\nexport class ApiEnumMember extends ApiNameMixin(ApiReleaseTagMixin(ApiInitializerMixin(ApiDeclaredItem))) {\n public constructor(options: IApiEnumMemberOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string): string {\n // No prefix needed, because ApiEnumMember is the only possible member of an ApiEnum\n return name;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.EnumMember;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiEnumMember.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.Exports, nameComponent)\n .withMeaning(Meaning.Member);\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 { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
import { type IApiTypeParameterListMixinOptions, ApiTypeParameterListMixin } from '../mixins/ApiTypeParameterListMixin';
import { type IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';
/**
* Constructor options for {@link ApiFunction}.
* @public
*/
export interface IApiFunctionOptions extends IApiNameMixinOptions, IApiTypeParameterListMixinOptions, IApiParameterListMixinOptions, IApiReleaseTagMixinOptions, IApiReturnTypeMixinOptions, IApiDeclaredItemOptions, IApiExportedMixinOptions {
}
declare const ApiFunction_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiReturnTypeMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiParameterListMixin) & (new (...args: any[]) => ApiTypeParameterListMixin) & (new (...args: any[]) => ApiNameMixin);
/**
* Represents a TypeScript function declaration.
*
* @remarks
*
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
* API declarations.
*
* `ApiFunction` represents a TypeScript declaration such as this example:
*
* ```ts
* export function getAverage(x: number, y: number): number {
* return (x + y) / 2.0;
* }
* ```
*
* Functions are exported by an entry point module or by a namespace. Compare with {@link ApiMethod}, which
* represents a function that is a member of a class.
*
* @public
*/
export declare class ApiFunction extends ApiFunction_base {
constructor(options: IApiFunctionOptions);
static getContainerKey(name: string, overloadIndex: number): string;
/** @override */
get kind(): ApiItemKind;
/** @override */
get containerKey(): string;
/** @beta @override */
buildCanonicalReference(): DeclarationReference;
}
export {};
//# sourceMappingURL=ApiFunction.d.ts.map
\ No newline at end of file
{"version":3,"file":"ApiFunction.d.ts","sourceRoot":"","sources":["../../src/model/ApiFunction.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,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,EAAE,KAAK,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EACL,KAAK,iCAAiC,EACtC,yBAAyB,EAC1B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,KAAK,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE7F;;;GAGG;AACH,MAAM,WAAW,mBACf,SAAQ,oBAAoB,EAC1B,iCAAiC,EACjC,6BAA6B,EAC7B,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB;CAAG;;AAE/B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,WAAY,SAAQ,gBAIhC;gBACoB,OAAO,EAAE,mBAAmB;WAIjC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM;IAI1E,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAQvD"}
\ 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