/** * Code formatting utilities * * Provides Prettier integration for formatting generated code. */ /** * Format options */ export interface FormatOptions { /** File path (used to infer parser) */ filepath?: string; /** Parser to use */ parser?: 'typescript' | 'json' | 'css' | 'html' | 'markdown'; /** Tab width */ tabWidth?: number; /** Use tabs instead of spaces */ useTabs?: boolean; /** Use single quotes */ singleQuote?: boolean; /** Print semicolons */ semi?: boolean; /** Trailing commas */ trailingComma?: 'none' | 'es5' | 'all'; } /** * Format code using Prettier * * Falls back to returning the original code if Prettier is not available. */ export declare const formatCode: (code: string, options?: FormatOptions) => Promise; /** * Format TypeScript/JavaScript code */ export declare const formatTypeScript: (code: string) => Promise; /** * Format JSON */ export declare const formatJson: (data: unknown) => Promise; /** * Format CSS */ export declare const formatCss: (code: string) => Promise; /** * Basic code indentation (for when Prettier is not available) */ export declare const indent: (code: string, spaces?: number) => string; /** * Remove leading indentation from a template literal */ export declare const dedent: (strings: TemplateStringsArray, ...values: unknown[]) => string; /** * Capitalize the first letter of a string */ export declare const capitalize: (str: string) => string; /** * Convert a string to camelCase */ export declare const camelCase: (str: string) => string; /** * Convert a string to PascalCase */ export declare const pascalCase: (str: string) => string; /** * Convert a string to kebab-case */ export declare const kebabCase: (str: string) => string; /** * Convert a string to snake_case */ export declare const snakeCase: (str: string) => string;