import type { VariableType } from "../types.js"; /** * Post-order transform of a VariableType tree. `fn` is invoked on each * node AFTER its children have been transformed, so children are already * in their new form when `fn` sees the parent. Returns a new tree; the * input is not mutated. * * Sibling of `visitTypes` (observer). Every VariableType variant must be * enumerated here — adding a new variant means updating both functions. * * Useful for type substitution, normalization, and any "rewrite this * tree" operation. Encapsulates the recursion so callers express the * "what" (a single-node transform) without re-walking every variant. */ export declare function mapTypes(t: VariableType, fn: (t: VariableType) => VariableType): VariableType; /** * Pre-order walk of every nested VariableType. The visitor is invoked once * per node, root first. Returning `true` from the visitor halts the walk * and propagates `true` back to the caller (used for short-circuiting * "does any nested type satisfy P?" predicates). */ export declare function visitTypes(t: VariableType, visit: (t: VariableType) => boolean | void): boolean;