template-saas/apps/backend/node_modules/@microsoft/tsdoc/lib/nodes/DocMemberIdentifier.js
rckrdmrd 26f0e52ca7 feat: Initial commit - template-saas
Template base para proyectos SaaS multi-tenant.

Estructura inicial:
- apps/backend (NestJS API)
- apps/frontend (React/Vite)
- apps/database (PostgreSQL DDL)
- docs/ (Documentación)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 04:41:24 -06:00

88 lines
3.3 KiB
JavaScript

// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
import { DocNodeKind, DocNode } from './DocNode';
import { StringChecks } from '../parser/StringChecks';
import { DocExcerpt, ExcerptKind } from './DocExcerpt';
/**
* A member identifier is part of a {@link DocMemberReference}.
*/
export class DocMemberIdentifier extends DocNode {
/**
* Don't call this directly. Instead use {@link TSDocParser}
* @internal
*/
constructor(parameters) {
super(parameters);
if (DocNode.isParsedParameters(parameters)) {
if (parameters.leftQuoteExcerpt) {
this._leftQuoteExcerpt = new DocExcerpt({
configuration: this.configuration,
excerptKind: ExcerptKind.MemberIdentifier_LeftQuote,
content: parameters.leftQuoteExcerpt
});
}
this._identifierExcerpt = new DocExcerpt({
configuration: this.configuration,
excerptKind: ExcerptKind.MemberIdentifier_Identifier,
content: parameters.identifierExcerpt
});
if (parameters.rightQuoteExcerpt) {
this._rightQuoteExcerpt = new DocExcerpt({
configuration: this.configuration,
excerptKind: ExcerptKind.MemberIdentifier_RightQuote,
content: parameters.rightQuoteExcerpt
});
}
}
else {
this._identifier = parameters.identifier;
}
}
/**
* Tests whether the input string can be used without quotes as a member identifier in a declaration reference.
* If not, {@link DocMemberIdentifier.hasQuotes} will be required.
*
* @remarks
* In order to be used without quotes, the string must follow the identifier syntax for ECMAScript / TypeScript,
* and it must not be one of the reserved words used for system selectors (such as `instance`, `static`,
* `constructor`, etc).
*/
static isValidIdentifier(identifier) {
return !StringChecks.explainIfInvalidUnquotedMemberIdentifier(identifier);
}
/** @override */
get kind() {
return DocNodeKind.MemberIdentifier;
}
/**
* The identifier string without any quote encoding.
*
* @remarks
* If the value is not a valid ECMAScript identifier, it will be quoted as a
* string literal during rendering.
*/
get identifier() {
if (this._identifier === undefined) {
this._identifier = this._identifierExcerpt.content.toString();
}
return this._identifier;
}
/**
* Returns true if the identifier will be rendered as a quoted string literal
* instead of as a programming language identifier. This is required if the
* `identifier` property is not a valid ECMAScript identifier.
*/
get hasQuotes() {
if (this._identifierExcerpt) {
return !!this._leftQuoteExcerpt;
}
else {
return !DocMemberIdentifier.isValidIdentifier(this.identifier);
}
}
/** @override */
onGetChildNodes() {
return [this._leftQuoteExcerpt, this._identifierExcerpt, this._rightQuoteExcerpt];
}
}
//# sourceMappingURL=DocMemberIdentifier.js.map