import type { SourceMap } from '../parser/types'; import type { TestRunResult } from './result'; /** * Convert a per-file coverage map + sourceMap into LCOV format. * * LCOV format per record: * TN: * SF: * DA:<1-based line number>, * LH: * LF: * end_of_record * * Node IDs are grouped by source file and start line. A line's hit count * is the maximum hit count of any node starting on that line — a line is * covered if at least one of its nodes was evaluated. */ export declare function generateLcov(coverageMap: Map, sourceMap: SourceMap): string; /** * Merge coverage results from multiple test files into a single LCOV report string. * Each test file has its own node ID space so we generate and concatenate per-file records. */ export declare function generateSuiteLcov(results: TestRunResult[]): string; export interface FileCoverageSummary { path: string; linesHit: number; linesFound: number; /** Total unique expressions (AST nodes) found in this file's sourceMap */ exprsFound: number; /** Expressions that were evaluated at least once */ exprsHit: number; /** 1-based line numbers that were never hit */ uncoveredLines: number[]; /** 0-based line → max hit count across all test runs. 0 = found but never hit. */ lineHits: Map; /** Source file content, when available */ source?: string; } export interface CoverageFilter { include: string[]; exclude: string[]; /** Root directory for resolving relative paths in patterns. Default: process.cwd() */ rootDir?: string; /** * When provided, all absolute file paths in this list are included in the summary * even if never evaluated — reported with 0% coverage. */ allFiles?: string[]; } /** * Compute per-source-file coverage summaries from all test run results. * Merges hits across test files by source path so each source file appears once. * When filter is provided, only files matching include/exclude patterns are returned. */ export declare function computeCoverageSummary(results: TestRunResult[], filter?: CoverageFilter): FileCoverageSummary[];