perf-lens
Version:
AI-powered frontend performance optimizer
22 lines • 1.16 kB
TypeScript
import { type Result } from 'lighthouse';
import type { LighthouseConfig, BundleThresholds, PerformanceThresholds, AIModelConfig, GlobalConfig } from '../types/config.js';
/**
* Runs Lighthouse performance analysis on the development server
* @param {LighthouseConfig & { bundleThresholds?: BundleThresholds, performanceThresholds?: PerformanceThresholds, ai?: AIModelConfig } & GlobalConfig} config - Configuration options for Lighthouse analysis
* @returns {Promise<{ metrics: string, report: string, analysis: { coreWebVitals: string, performanceOpportunities: string, diagnostics: string }, fullReport: Result }>} Object containing formatted metrics, report, AI analysis, and full Lighthouse result
*/
export declare function runLighthouse(config?: LighthouseConfig & {
bundleThresholds?: BundleThresholds;
performanceThresholds?: PerformanceThresholds;
ai?: AIModelConfig;
} & GlobalConfig): Promise<{
metrics: string;
report: string;
analysis: {
coreWebVitals: string;
performanceOpportunities: string;
diagnostics: string;
};
fullReport: Result;
}>;
//# sourceMappingURL=lighthouse.d.ts.map