perf-lens
Version:
AI-powered frontend performance optimizer
44 lines • 1.59 kB
TypeScript
import type { PerflensConfig } from '../types';
interface PerformanceReport {
lighthouse: {
metrics: string;
report: string;
analysis: {
coreWebVitals: string;
performanceOpportunities: string;
diagnostics: string;
};
};
codeAnalysis: {
critical: string[];
warnings: string[];
suggestions: string[];
};
metadata: {
timestamp: string;
duration: number;
config: PerflensConfig;
};
}
/**
* Generates a markdown report from performance analysis data
* @param {PerformanceReport} data - The performance analysis data to format
* @returns {string} A formatted markdown report
*/
export declare function generateMarkdownReport(data: PerformanceReport): string;
/**
* Generates an HTML report from performance analysis data with styling
* @param {PerformanceReport} data - The performance analysis data to format
* @returns {string} A formatted HTML report with embedded styles
*/
export declare function generateHtmlReport(data: PerformanceReport): string;
/**
* Saves a performance report in the specified format
* @param {PerformanceReport} data - The performance analysis data to save
* @param {'md' | 'html'} format - The output format (markdown or HTML)
* @param {string} [outputPath] - Optional path to save the report
* @returns {string} The path where the report was saved
*/
export declare function saveReport(data: PerformanceReport, format?: 'md' | 'html', outputPath?: string): string;
export {};
//# sourceMappingURL=output.d.ts.map