/** * TypeExpr to MEL Renderer * * Converts TypeExpr AST to MEL type syntax. * * @example * // { kind: "primitive", name: "string" } -> "string" * // { kind: "array", element: { kind: "ref", name: "Todo" } } -> "Array" * // { kind: "union", members: [...] } -> "string | number | null" */ /** * TypeExpr type from translator package */ export type TypeExpr = { kind: "primitive"; name: "string" | "number" | "boolean" | "null"; } | { kind: "literal"; value: string | number | boolean | null; } | { kind: "ref"; name: string; } | { kind: "array"; element: TypeExpr; } | { kind: "record"; key: TypeExpr; value: TypeExpr; } | { kind: "union"; members: TypeExpr[]; } | { kind: "object"; fields: TypeField[]; }; export type TypeField = { readonly name: string; readonly optional: boolean; readonly type: TypeExpr; }; /** * Renders a TypeExpr to MEL type syntax string. * * @param typeExpr - The TypeExpr to render * @returns MEL type syntax string */ export declare function renderTypeExpr(typeExpr: TypeExpr): string; /** * Renders a TypeField with optional default value. * * @param field - The TypeField to render * @param defaultValue - Optional default value * @returns MEL field declaration string */ export declare function renderTypeField(field: TypeField, defaultValue?: unknown): string; /** * Renders a JavaScript value to MEL syntax. */ export declare function renderValue(value: unknown): string;