import { TypeAliasEntry, VariableType } from "../types.js"; /** * Public resolveType: normalizes a VariableType by resolving type-alias * references and built-in generic forms. * * `Array` → `arrayType { elementType: T }` * `Schema` → `schemaType { inner: T }` * `Record` → 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): 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): 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` is substituted, the resulting body may contain * further generic forms (e.g. `Wrapper`) that the substituting call * hasn't seen. Codegen needs every generic resolved away (other than the * survivable `Record` 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): VariableType; export declare function widenType(vt: VariableType): VariableType; /** True iff `vt` is the bottom type `never`. */ export declare function isNever(vt: VariableType): boolean; /** * A type that admits `null` as a value, so the corresponding object * property may be absent from the source. Covers the `key?: T` desugaring * (parsed as `T | null`) plus `any`, which subsumes null. */ export declare function isOptionalType(vt: VariableType, typeAliases: Record): boolean; export declare function isAssignable(source: VariableType, target: VariableType, typeAliases: Record): boolean;