{"version":3,"names":[],"sources":["../src/types.ts"],"sourcesContent":["import type * as t from \"@babel/types\";\nimport type { NodePath } from \"./index\";\nimport type { VirtualTypeAliases } from \"./path/lib/virtual-types\";\n\nexport type Visitor = VisitNodeObject & {\n [Type in t.Node[\"type\"]]?: VisitNode>;\n} & {\n [K in keyof t.Aliases]?: VisitNode;\n} & {\n [K in keyof VirtualTypeAliases]?: VisitNode;\n} & {\n [K in keyof InternalVisitorFlags]?: InternalVisitorFlags[K];\n} & {\n // Babel supports `NodeTypesWithoutComment | NodeTypesWithoutComment | ... ` but it is\n // too complex for TS. So we type it as a general visitor only if the key contains `|`\n // this is good enough for non-visitor traverse options e.g. `noScope`\n [k: `${string}|${string}`]: VisitNode;\n};\n\n/** @internal */\ntype InternalVisitorFlags = {\n _exploded?: boolean;\n _verified?: boolean;\n};\n\nexport type VisitNode =\n | VisitNodeFunction\n | VisitNodeObject;\n\nexport type VisitNodeFunction = (\n this: S,\n path: NodePath

,\n state: S,\n) => void;\n\nexport interface VisitNodeObject {\n enter?: VisitNodeFunction;\n exit?: VisitNodeFunction;\n}\n"],"mappings":""}