/** * CLI output formatting. * * Transforms RollResult into terminal-appropriate strings. * * @module cli/format */ import type { RollResult } from '../types.js'; /** * Output mode selectors for {@link formatResult}. */ export type FormatOptions = { /** Emit the whole result as compact JSON. Takes precedence over `verbose`. */ json?: boolean; /** Show the detailed roll breakdown instead of the bare total. */ verbose?: boolean; /** Seed that produced the result. Emitted in JSON mode only. */ seed: string; }; /** * Formats a roll result for terminal display. * * In normal mode, returns just the total. In verbose mode, returns the * rendered breakdown with terminal-safe formatting for dropped dice. In JSON * mode, returns the complete `RollResult` — including the structured `parts` * tree — as a single-line `JSON.stringify` payload, where `degree` appears as * its numeric `DegreeOfSuccess` value. * * The JSON payload appends two fields the library result does not carry: the * `seed` that produced the result and the `version` that fixes the * seed-to-dice mapping. Together they let the payload replay through `--seed` * on the same major. * * @param result - The roll result to format * @param options - Output mode; JSON wins when combined with verbose * @returns Formatted string for terminal output */ export declare function formatResult(result: RollResult, options: FormatOptions): string; //# sourceMappingURL=format.d.ts.map