{"version":3,"names":[],"sources":["../src/types.ts"],"sourcesContent":["import type * as t from \"@babel/types\";\nimport type { NodePath } from \"./index.ts\";\nimport type { VirtualTypeAliases } from \"./path/lib/virtual-types.ts\";\n\nexport type VisitPhase = \"enter\" | \"exit\";\n\ntype VisitNodeObject = {\n [K in VisitPhase]?: VisitNodeFunction;\n};\n\nexport type ExplVisitNode = {\n [K in VisitPhase]?: VisitNodeFunction[];\n};\n\nexport type ExplodedVisitor = ExplVisitNode & {\n [Type in t.Node[\"type\"]]?: ExplVisitNode>;\n} & { _exploded: true; _verified: true };\n\nexport type Visitor =\n | (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 // 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 | ExplodedVisitor;\n\nexport type VisitNode =\n | VisitNodeFunction\n | VisitNodeObject;\n\nexport type VisitNodeFunction = (\n this: S,\n path: NodePath
,\n state: S,\n) => void;\n"],"mappings":""}