UNPKG

@ts-ast-parser/core

Version:

Reflects a simplified version of the TypeScript AST for generating documentation

48 lines 1.57 kB
import type { BindingElement } from '../models/binding-element.js'; import type { ReflectedNode } from '../reflected-node.js'; import type { ProjectContext } from '../project-context.js'; import type ts from 'typescript'; /** * Represents the reflected binding element node. * A binding element appears in the named parameters of a signature. */ export declare class BindingElementNode implements ReflectedNode<BindingElement, ts.BindingElement> { private readonly _node; private readonly _context; constructor(node: ts.BindingElement, context: ProjectContext); /** * The TypeScript AST node related to this reflected node * * @returns The original TypeScript node */ getTSNode(): ts.BindingElement; /** * The context includes useful APIs that are shared across * all the reflected symbols. * * Some APIs include the parsed configuration options, the * system interface, the type checker * * @returns The analyser context */ getContext(): ProjectContext; /** * Reads the name of the binding element node * * @returns The name of the binding element */ getName(): string; /** * The default value of the binding element. * * @returns The default value, otherwise it will return `undefined` */ getDefault(): unknown; /** * Serializes the reflected node * * @returns The reflected node as a serializable object */ serialize(): BindingElement; } //# sourceMappingURL=binding-element-node.d.ts.map