interface FileCoverage

Per-source-file line coverage, accumulated across every executed bundle. Keyed by absolute source path. Lines are 1-based, matching editor/lcov conventions.

const file: FileCoverage = {
  coverable: new Set([1, 2, 5]),
  covered: new Map([[1, 3]]),
  sourceContent: null,
};
file.covered.get(1); // 3 — line 1 was hit three times; lines 2 and 5 stayed uncovered

Properties

coverable: Set<number>

1-based line numbers that the source map attributes to executable bundle positions.

covered: Map<number, number>

1-based line number → highest V8 hit count observed for that line.

sourceContent: string | null

Verbatim original source text (from the map's sourcesContent), for the HTML report.

Usage

import { type FileCoverage } from "lib/types.ts";