import { TypeAliasEntry, VariableType } from "../types.js";
/**
 * Public resolveType: normalizes a VariableType by resolving type-alias
 * references and built-in generic forms.
 *
 *   `Array<T>`  → `arrayType { elementType: T }`
 *   `Schema<T>` → `schemaType { inner: T }`
 *   `Record<K, V>` → unchanged `genericType` (survives to codegen) after
 *                    validating the key type
 *   `typeAliasVariable("X")` → body of alias X (recursively)
 *
 * Recursion guarding for self-referential generic aliases (added in
 * Task 9) lives in the private `resolveTypeWithGuard` helper. The public
 * signature stays small.
 */
export declare function resolveType(vt: VariableType, typeAliases: Record<string, TypeAliasEntry>): VariableType;
/**
 * Non-throwing wrapper around `resolveType` for use inside the main
 * typecheck pipeline (synthesizer, isAssignable, etc.). If the input
 * contains an invalid generic form (unknown name, wrong arity, bad
 * Record key, missing required type args, …) we don't want to crash the
 * entire typecheck run — the user-facing diagnostic is reported by
 * `validateTypeReferences` as part of the regular validation pass, and
 * callers here just need a usable VariableType to continue with.
 *
 * Falling back to `any` matches how unresolved/unknown types are handled
 * everywhere else in the checker — it short-circuits further constraints
 * without producing spurious assignability errors.
 */
export declare function safeResolveType(vt: VariableType, typeAliases: Record<string, TypeAliasEntry>): VariableType;
/**
 * Recursively resolve generic types and type aliases throughout a type tree.
 *
 * `resolveType` only normalizes a single node — when a user-defined generic
 * alias like `Container<T>` is substituted, the resulting body may contain
 * further generic forms (e.g. `Wrapper<number>`) that the substituting call
 * hasn't seen. Codegen needs every generic resolved away (other than the
 * survivable `Record<K, V>` form), so this function applies `resolveType`
 * iteratively until a pass produces no change.
 *
 * Used by the TypeScript builder before calling `mapTypeToValidationSchema`
 * / `mapTypeToZodSchema`, neither of which knows how to substitute user-
 * defined generic aliases.
 */
export declare function resolveTypeDeep(t: VariableType, typeAliases: Record<string, TypeAliasEntry>): VariableType;
export declare function widenType(vt: VariableType | "any"): VariableType | "any";
export declare function isAssignable(source: VariableType | "any", target: VariableType | "any", typeAliases: Record<string, TypeAliasEntry>): boolean;
