Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Aquaticat/Monochromatic. TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a m
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930/** {@link tomlStringify}: emit the TOML text for the current state. @module */
import { emitDocument, } from './emit-document.ts';import type { TomlEditState, } from './types.ts';
/** Emit the current state as TOML text by walking its block tree. Clean (unmutated) nodes emit their original bytes verbatim, so a parsed document with no edits is byte-identical to its source. Mutated nodes render canonically per `edit.canonical`. @param edit - The state to emit. @returns The TOML output. @example ```ts const edit = parseTomlEdit({ source, },); tomlStringify({ edit, },); // === source ``` */export function tomlStringify({ edit, }: { readonly edit: TomlEditState; },): string { return emitDocument({ edit, },);}