UNPKG

@ts-ast-parser/core

Version:

Reflects a simplified version of the TypeScript AST for generating documentation

45 lines 1.91 kB
import { ExpressionWithTypeArgumentsNode } from './expression-with-type-arguments-node.js'; import type { InterfaceDeclaration } from '../models/interface.js'; import { DeclarationKind } from '../models/declaration-kind.js'; import { IndexSignatureNode } from './index-signature-node.js'; import type { ProjectContext } from '../project-context.js'; import { TypeParameterNode } from './type-parameter-node.js'; import type { DeclarationNode } from './declaration-node.js'; import { PropertyNode } from './property-node.js'; import { FunctionNode } from './function-node.js'; import { RootNodeType } from '../models/node.js'; import { CommentNode } from './comment-node.js'; import ts from 'typescript'; /** * Represents the reflected node of an interface declaration */ export declare class InterfaceNode implements DeclarationNode<InterfaceDeclaration, ts.InterfaceDeclaration> { private readonly _node; private readonly _context; private readonly _members; private readonly _jsDoc; private readonly _heritage; constructor(node: ts.InterfaceDeclaration, context: ProjectContext); getName(): string; getNodeType(): RootNodeType; getKind(): DeclarationKind.Interface; getContext(): ProjectContext; getTSNode(): ts.InterfaceDeclaration; getLine(): number; getIndexSignature(): IndexSignatureNode | null; getProperties(): PropertyNode[]; getPropertyWithName(name: string): PropertyNode | null; getMethods(): FunctionNode[]; getMethodWithName(name: string): FunctionNode | null; getTypeParameters(): TypeParameterNode[]; getNamespace(): string; getJSDoc(): CommentNode; getHeritage(): ExpressionWithTypeArgumentsNode[]; /** * Serializes the reflected node * * @returns The reflected node as a serializable object */ serialize(): InterfaceDeclaration; } //# sourceMappingURL=interface-node.d.ts.map