/** * MRSF string (de)serialization — pure, dependency-light helpers that parse and * serialize MRSF sidecar content to/from strings. * * This module intentionally has **no Node-only imports** (no `node:fs`, * `node:path`, `node:crypto`, …) so it can be consumed from browser/host * adapters via the slim `@mrsf/cli/browser` entry point. Filesystem-bound * helpers (read/discover/write a file) live in `parser.ts` / `writer.ts`. */ import type { MrsfDocument, Comment } from "./types.js"; /** Result from a lenient (non-throwing) parse attempt. */ export interface LenientParseResult { /** Fully parsed document, or null if parsing failed entirely. */ doc: MrsfDocument | null; /** If parsing failed or produced warnings, the error message. */ error?: string; /** Comments that could be salvaged from a partially-corrupted sidecar. */ partialComments?: Comment[]; } /** * Parse MRSF sidecar content from a string. * Detects JSON vs YAML based on content or optional filename hint. */ export declare function parseSidecarContent(content: string, filenameHint?: string): MrsfDocument; /** * Lenient parse from string content. */ export declare function parseSidecarContentLenient(content: string, filenameHint?: string): LenientParseResult; /** * Serialize an MrsfDocument to YAML (for new files / non-round-trip use). */ export declare function toYaml(doc: MrsfDocument): string; /** * Serialize an MrsfDocument to JSON. */ export declare function toJson(doc: MrsfDocument): string; //# sourceMappingURL=serialize.d.ts.map