/** * Renders fields plus body as a frontmatter markdown document. The YAML is * normalized to match Bun's YAML.stringify output (no trailing newline; a * space after keys that open nested blocks) so file contents don't churn * depending on which runtime wrote them. */ export declare function composeFrontmatterDocument(fields: Record, body: string): string; export type FrontmatterResult = { ok: true; fields: Record; body: string; } | { ok: false; error: string; }; /** * Splits a markdown document into YAML frontmatter fields and body. Never * throws: malformed YAML, missing/empty frontmatter, and non-mapping * frontmatter (e.g. a plain document that happens to contain horizontal * rules) all return a descriptive error instead. */ export declare function parseFrontmatter(content: string): FrontmatterResult;