UNPKG

@ts-ast-parser/core

Version:

Reflects a simplified version of the TypeScript AST for generating documentation

33 lines 1.22 kB
import type { ReflectedRootNode } from '../reflected-node.js'; import type { ProjectContext } from '../project-context.js'; import type { Import } from '../models/import.js'; import { ImportKind } from '../models/import.js'; import { RootNodeType } from '../models/node.js'; import type ts from 'typescript'; /** * Represents the reflected node of a named import declaration. * For example: `import { x } from 'y'` */ export declare class NamedImportNode implements ReflectedRootNode<Import, ts.ImportDeclaration> { private readonly _node; private readonly _element; private readonly _context; constructor(node: ts.ImportDeclaration, element: ts.ImportSpecifier, context: ProjectContext); getTSNode(): ts.ImportDeclaration; getContext(): ProjectContext; getName(): string; getReferenceName(): string; getNodeType(): RootNodeType; getKind(): ImportKind; getImportPath(): string; getOriginalPath(): string; isTypeOnly(): boolean; isBareModuleSpecifier(): boolean; /** * Serializes the reflected node * * @returns The reflected node as a serializable object */ serialize(): Import; } //# sourceMappingURL=named-import-node.d.ts.map