UNPKG

@ts-ast-parser/core

Version:

Reflects a simplified version of the TypeScript AST for generating documentation

33 lines 1.26 kB
import type { FunctionSignature } from '../models/function.js'; import type { ProjectContext } from '../project-context.js'; import { TypeParameterNode } from './type-parameter-node.js'; import type { ReflectedNode } from '../reflected-node.js'; import { ParameterNode } from './parameter-node.js'; import type { Type } from '../models/type.js'; import { CommentNode } from './comment-node.js'; import ts from 'typescript'; /** * Represents the reflected node of a signature declaration */ export declare class SignatureNode implements ReflectedNode<FunctionSignature, ts.Signature> { private readonly _node; private readonly _context; private readonly _jsDoc; constructor(node: ts.Signature, context: ProjectContext); getContext(): ProjectContext; getTSNode(): ts.Signature; getLine(): number; getPath(): string; getJSDoc(): CommentNode; getReturnType(): ReflectedNode<Type>; getTypeParameters(): TypeParameterNode[]; getParameters(): ParameterNode[]; getParameterByName(name: string): ParameterNode | null; /** * Serializes the reflected node * * @returns The reflected node as a serializable object */ serialize(): FunctionSignature; } //# sourceMappingURL=signature-node.d.ts.map