interface ConvertOptions { /** * Document Heading text. A string replaces the default `"Results"` (rendered * as plain text, never raw Markdown); `null` omits the H1 entirely without * shifting body heading levels. An empty string is INVALID_OPTION. */ readonly heading?: string | null; /** Emit Type Annotations (` *(integer)*` …) after annotatable values. Default false. */ readonly showTypes?: boolean; } type JsonToMarkdownErrorCode = "INVALID_JSON_SYNTAX" | "DUPLICATE_MEMBER_NAME" | "INVALID_PARSED_VALUE" | "CYCLIC_REFERENCE" | "SPARSE_ARRAY" | "INVALID_OPTION"; interface SourceLocation { /** Zero-based UTF-16 code-unit index. */ readonly offset: number; /** One-based line number. */ readonly line: number; /** One-based UTF-16 code-unit position within the line. */ readonly column: number; } interface JsonToMarkdownErrorDetails { readonly pointer?: string; readonly location?: SourceLocation; /** First occurrence of a member name reported as DUPLICATE_MEMBER_NAME. */ readonly firstLocation?: SourceLocation; } declare class JsonToMarkdownError extends Error { readonly code: JsonToMarkdownErrorCode; readonly pointer: string | undefined; readonly location: SourceLocation | undefined; readonly firstLocation: SourceLocation | undefined; constructor(code: JsonToMarkdownErrorCode, message: string, details?: JsonToMarkdownErrorDetails); } type JsonObject = { readonly [key: string]: JsonValue; }; type JsonArray = readonly JsonValue[]; type JsonValue = null | boolean | number | string | JsonObject | JsonArray; /** * Convert caller-trusted parsed JSON data into a deterministic GFM Output Document. * Validates the value at runtime and throws {@link JsonToMarkdownError} on invalid input. */ declare function convertJsonValue(value: unknown, options?: ConvertOptions): string; /** * Convert untrusted Serialized JSON Text into a deterministic GFM Output Document. * Parses without executing caller code, preserves numeric lexemes losslessly, and * throws {@link JsonToMarkdownError} on invalid input. */ declare function convertJsonText(source: string, options?: ConvertOptions): string; export { type ConvertOptions, type JsonArray, type JsonObject, JsonToMarkdownError, type JsonToMarkdownErrorCode, type JsonValue, type SourceLocation, convertJsonText, convertJsonValue };