import type { Expression, Program } from './program'; /** * Options that drive the pretty-printer's layout decisions. The formatter is * intentionally opinionated — these three knobs are the entire surface for * stylistic customisation. */ export interface FormatOptions { /** Indent width in spaces. Default 2. */ indent?: number; /** * Line-length budget that drives wrap decisions for record literals, * arrays, repeat / fold bodies, and match arms. Default 80. */ printWidth?: number; /** * One blank line between consecutive top-level statements. Default true. * Set false for tight forms (e.g. inline literals in test fixtures). */ blankLineBetweenStatements?: boolean; } /** * Pretty-print a `Program` AST back to source. The output, when re-parsed, * produces an `equivalentWithComments`-equal AST (the round-trip invariant * — see `docs/features/proposed/program-pretty-printer.md`). */ export declare function format(program: Program, options?: FormatOptions): string; /** * Format a single {@link Expression} to its canonical source form. * * This is the standalone, single-source pretty-printer for the full program * expression grammar (records, arrays, `if`/`match`/comprehension/`fold`, * field/index/slice access, rounding, …). It is the entry point that the * compact dice-idiom renderer (`DE.toString` in `dice-expression-domain.ts`) * delegates to for the non-dice expression shapes it does not special-case, * replacing the previous un-reparseable `JSON.stringify` fallback. * * Output is reparseable: re-parsing the result yields an equivalent AST. */ export declare function formatExpression(expr: Expression, options?: FormatOptions): string;