| | |
| | | constantViolations: NodePath[]; |
| | | } |
| | | |
| | | export type Visitor<S = {}> = VisitNodeObject<S, Node> & |
| | | { |
| | | [Type in Node['type']]?: VisitNode<S, Extract<Node, { type: Type }>>; |
| | | } & |
| | | { |
| | | [K in keyof t.Aliases]?: VisitNode<S, t.Aliases[K]>; |
| | | }; |
| | | export type Visitor<S = {}> = VisitNodeObject<S, Node> & { |
| | | [Type in Node['type']]?: VisitNode<S, Extract<Node, { type: Type }>>; |
| | | } & { |
| | | [K in keyof t.Aliases]?: VisitNode<S, t.Aliases[K]>; |
| | | }; |
| | | |
| | | export type VisitNode<S, P extends Node> = VisitNodeFunction<S, P> | VisitNodeObject<S, P>; |
| | | |
| | |
| | | |
| | | getData(key: string, def?: any): any; |
| | | |
| | | hasNode(): this is NodePath<NonNullable<this['node']>>; |
| | | |
| | | buildCodeFrameError<TError extends Error>(msg: string, Error?: new (msg: string) => TError): TError; |
| | | |
| | | traverse<T>(visitor: Visitor<T>, state: T): void; |