export type Type = { kind: "scalar"; name: string; } | { kind: "array"; element: Type; } | { kind: "map"; key: Type; value: Type; } | { kind: "struct"; fields: StructField[]; } | { kind: "unknown"; }; export interface StructField { name: string; type: Type; } export declare const UNKNOWN: Type; /** A scalar type by canonical name (after alias normalisation). */ export declare function scalar(name: string): Type; /** Parse a SQL type string into a `Type`; `unknown` if it's empty/unparseable. `aliases` maps a * dialect's scalar names onto the shared canonical names (Spark by default; pass TSQL_ALIASES for * T-SQL, e.g. bit→boolean, datetime→timestamp, nvarchar→string). `dialect` folds struct field * names with that dialect's identifier rules (fields are stored folded — identity keys); absent, * the default fold (backtick-strip + lower) reproduces the legacy behavior. */ export declare function parseType(text: string, aliases?: Record, foldField?: (name: string) => string): Type; /** Spark/Databricks scalar type aliases → the shared canonical names (also the default table for * `parseType` below). Exported so `src/dialect-symbols.ts` can build the databricks `types` set from * it without duplicating the table. */ export declare const SCALAR_ALIASES: Record; /** T-SQL scalar type names → the shared canonical names. T-SQL has no array/map/struct types, so * only scalar normalisation differs from Spark. float is double-precision in T-SQL; real is single. */ export declare const TSQL_ALIASES: Record; /** Whether a scalar name is any interval-family name (bare or qualified). */ export declare function isIntervalName(name: string): boolean; /** The (family fields, lo, hi) span of a QUALIFIED interval name; undefined for bare "interval" * and non-interval names. */ export declare function intervalSpan(name: string): { fields: readonly string[]; lo: number; hi: number; } | undefined; /** Build a qualified-interval scalar Type from a family's field list and a lo..hi field range. */ export declare function intervalTypeOf(fields: readonly string[], lo: number, hi: number): Type; /** Render a Type as a display string (scalar name, array<…>, map<…,…>, struct, unknown). * Pure formatting — used by the LSP hover feature so the adapter never walks the Type union. */ export declare function formatType(t: Type): string;