@ts-ast-parser/core
Version:
Reflects a simplified version of the TypeScript AST for generating documentation
38 lines • 1.5 kB
TypeScript
import type { VariableDeclaration } from '../models/variable.js';
import { DeclarationKind } from '../models/declaration-kind.js';
import type { ProjectContext } from '../project-context.js';
import type { DeclarationNode } from './declaration-node.js';
import type { ReflectedNode } from '../reflected-node.js';
import { DecoratorNode } from './decorator-node.js';
import { RootNodeType } from '../models/node.js';
import { CommentNode } from './comment-node.js';
import type { Type } from '../models/type.js';
import type ts from 'typescript';
/**
* Represents the reflected node of a variable declaration
*/
export declare class VariableNode implements DeclarationNode<VariableDeclaration, ts.VariableDeclaration> {
private readonly _node;
private readonly _declaration;
private readonly _context;
private readonly _jsDoc;
constructor(node: ts.VariableStatement, declaration: ts.VariableDeclaration, context: ProjectContext);
getContext(): ProjectContext;
getName(): string;
getTSNode(): ts.VariableDeclaration;
getNodeType(): RootNodeType;
getKind(): DeclarationKind.Variable;
getDecorators(): DecoratorNode[];
getLine(): number;
getType(): ReflectedNode<Type>;
getValue(): unknown;
getNamespace(): string;
getJSDoc(): CommentNode;
/**
* Serializes the reflected node
*
* @returns The reflected node as a serializable object
*/
serialize(): VariableDeclaration;
}
//# sourceMappingURL=variable-node.d.ts.map