import type { CslItem, CslLibrary } from "./types"; /** * Convert a CSL item to its spec-compliant serializable form. * * The in-memory `keyword` field is an array, but CSL-JSON expects a * semicolon-separated string. This normalizes `keyword` and omits the field * when it is empty or undefined. Use this at any output boundary (storage * write, `export` command) so emitted CSL-JSON is always valid. * * @param item - CSL item with in-memory (array) keyword * @returns Item with `keyword` normalized to a string (or omitted) */ export declare function toSerializableCslItem(item: CslItem): Record; /** * Convert a CSL library to its spec-compliant serializable form. * @param library - CSL-JSON library (array of items) * @returns Array of items with normalized keyword fields */ export declare function toSerializableCslLibrary(library: CslLibrary): Record[]; /** * Serialize a CSL-JSON library to a formatted JSON string * @param library - CSL-JSON library (array of items) * @returns Formatted JSON string with 2-space indentation */ export declare function serializeCslJson(library: CslLibrary): string; /** * Write a CSL-JSON library to a file * @param filePath - Path to write the CSL-JSON file * @param library - CSL-JSON library to write * @throws Error if file cannot be written */ export declare function writeCslJson(filePath: string, library: CslLibrary): Promise; //# sourceMappingURL=serializer.d.ts.map