@ts-ast-parser/core
Version:
Reflects a simplified version of the TypeScript AST for generating documentation
62 lines • 1.81 kB
TypeScript
import type { ProjectContext } from '../project-context.js';
import type { ReflectedNode } from '../reflected-node.js';
import type { EnumMember } from '../models/enum.js';
import { CommentNode } from './comment-node.js';
import type ts from 'typescript';
/**
* Represents the reflected node of an enum member
*/
export declare class EnumMemberNode implements ReflectedNode<EnumMember, ts.EnumMember> {
private readonly _node;
private readonly _value;
private readonly _context;
private readonly _jsDoc;
constructor(node: ts.EnumMember, value: string | number, context: ProjectContext);
/**
* The name of the enum member
*
* @returns The name of the enum member
*/
getName(): string;
/**
* The value of the enum member
*
* @returns The value of the enum member
*/
getValue(): string | number;
/**
* The context includes useful APIs that are shared across
* all the reflected symbols.
*
* Some APIs include the parsed configuration options, the
* system interface, the type checker
*
* @returns The analyser context
*/
getContext(): ProjectContext;
/**
* The line position where the enum member is defined
*
* @returns The start line position number
*/
getLine(): number;
/**
* The original TypeScript node
*
* @returns The TypeScript AST node related to this reflected node
*/
getTSNode(): ts.EnumMember;
/**
* The reflected documentation comment
*
* @returns The JSDoc node
*/
getJSDoc(): CommentNode;
/**
* Serializes the reflected node
*
* @returns The reflected node as a serializable object
*/
serialize(): EnumMember;
}
//# sourceMappingURL=enum-member-node.d.ts.map