/** * Source Map v3 Serializer * * Serializes KERN's SourceMapEntry[] into the standard Source Map v3 JSON format * (https://sourcemaps.info/spec.html). This enables debuggers and editors to map * generated TypeScript back to the original .kern source. */ import type { SourceMapEntry } from './types.js'; /** Standard Source Map v3 JSON structure */ export interface SourceMapV3 { version: 3; file: string; sourceRoot: string; sources: string[]; names: string[]; mappings: string; } /** * Serialize KERN source map entries to a standard Source Map v3 JSON object. * * @param entries - Array of KERN source map entries (IR position → output position) * @param file - The generated output filename (e.g., `'Home.tsx'`) * @param source - The original .kern source filename (e.g., `'Home.kern'`) * @param sourceRoot - Optional root path for sources (default: `''`) * @returns A Source Map v3 JSON object ready for `JSON.stringify()` */ export declare function serializeSourceMap(entries: SourceMapEntry[], file: string, source: string, sourceRoot?: string): SourceMapV3;