fork of hey-api/openapi-ts because I need some additional things
1import type { File } from '../files/file';
2import type { Language } from '../languages/types';
3import type { IAnalysisContext } from '../planner/types';
4import type { Symbol } from '../symbols/symbol';
5import type { AstContext } from './context';
6
7export interface INode<T = unknown> {
8 /** Perform semantic analysis. */
9 analyze(ctx: IAnalysisContext): void;
10 /** Whether this node is exported from its file. */
11 exported?: boolean;
12 /** The file this node belongs to. */
13 file?: File;
14 /** The programming language associated with this node */
15 language: Language;
16 /** Parent node in the syntax tree. */
17 parent?: INode;
18 /** Root node of the syntax tree. */
19 root?: INode;
20 /** The symbol associated with this node. */
21 symbol?: Symbol;
22 /** Convert this node into AST representation. */
23 toAst(ctx: AstContext): T;
24 /** Brand used for renderer dispatch. */
25 readonly '~brand': string;
26}