XuqmGroup-H5SDK/node_modules/@microsoft/api-extractor-model/lib-esm/model/ApiConstructor.js
徐勤民 e34fa2052a feat(private): add private deployment SDK module
Adds @xuqm/h5-sdk/private entry point with JSON-based initialization,
feature gating, and error codes for private deployment scenarios.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 21:08:08 +08:00

60 行
2.2 KiB
JavaScript

// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
import { DeclarationReference, Meaning, Navigation } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
import { ApiItemKind } from '../items/ApiItem';
import { ApiDeclaredItem } from '../items/ApiDeclaredItem';
import { ApiParameterListMixin } from '../mixins/ApiParameterListMixin';
import { ApiProtectedMixin } from '../mixins/ApiProtectedMixin';
import { ApiReleaseTagMixin } from '../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
*/
export class ApiConstructor extends ApiParameterListMixin(ApiProtectedMixin(ApiReleaseTagMixin(ApiDeclaredItem))) {
constructor(options) {
super(options);
}
static getContainerKey(overloadIndex) {
return `|${ApiItemKind.Constructor}|${overloadIndex}`;
}
/** @override */
get kind() {
return 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.empty().addNavigationStep(Navigation.Members, '(parent)');
return parent.withMeaning(Meaning.Constructor).withOverloadIndex(this.overloadIndex);
}
}
//# sourceMappingURL=ApiConstructor.js.map