@ts-ast-parser/core
Version:
Reflects a simplified version of the TypeScript AST for generating documentation
37 lines • 1.37 kB
TypeScript
import { BindingElementNode } from './binding-element-node.js';
import type { ProjectContext } from '../project-context.js';
import type { ReflectedNode } from '../reflected-node.js';
import type { Parameter } from '../models/parameter.js';
import { DecoratorNode } from './decorator-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 parameter declaration
*/
export declare class ParameterNode implements ReflectedNode<Parameter, ts.ParameterDeclaration> {
private readonly _node;
private readonly _symbol;
private readonly _context;
private readonly _jsDoc;
constructor(node: ts.ParameterDeclaration, symbol: ts.Symbol | null, context: ProjectContext);
getName(): string;
getTSNode(): ts.ParameterDeclaration;
getContext(): ProjectContext;
getLine(): number;
getType(): ReflectedNode<Type>;
getDefault(): unknown;
getDecorators(): DecoratorNode[];
getNamedElements(): BindingElementNode[];
getJSDoc(): CommentNode;
isNamed(): boolean;
isRest(): boolean;
isOptional(): boolean;
/**
* Serializes the reflected node
*
* @returns The reflected node as a serializable object
*/
serialize(): Parameter;
}
//# sourceMappingURL=parameter-node.d.ts.map