UNPKG

@ts-ast-parser/core

Version:

Reflects a simplified version of the TypeScript AST for generating documentation

39 lines 1.69 kB
import type { ProjectContext } from '../project-context.js'; import type { ReflectedRootNode } from '../reflected-node.js'; import type { Export } from '../models/export.js'; import { ExportKind } from '../models/export.js'; import { RootNodeType } from '../models/node.js'; import type ts from 'typescript'; export type ExportDeclarationNodeType = ts.FunctionDeclaration | ts.ClassDeclaration | ts.InterfaceDeclaration | ts.EnumDeclaration | ts.TypeAliasDeclaration | ts.VariableStatement; /** * Represents the reflected node of an export declaration. * For example: `export const x = 4` or `export class Foo {}` */ export declare class ExportDeclarationNode implements ReflectedRootNode<Export, ExportDeclarationNodeType> { private readonly _node; private readonly _declaration; private readonly _context; constructor(node: ExportDeclarationNodeType, context: ProjectContext, declaration?: ts.VariableDeclaration); getName(): string; /** * The qualified name of the symbol is considered the name of the symbol including the * parent namespaces where the symbol is defined. * * For example: `<NamespaceName1>.<Namespace2>.<SymbolName>` * * @returns The name of the symbol prefixed by any parent namespace is inside */ getFullyQualifiedName(): string; getOriginalName(): string; getNodeType(): RootNodeType; getContext(): ProjectContext; getKind(): ExportKind; getTSNode(): ExportDeclarationNodeType; /** * Serializes the reflected node * * @returns The reflected node as a serializable object */ serialize(): Export; } //# sourceMappingURL=export-declaration-node.d.ts.map