import { LogInfo } from "./log-info"; import { LogLevel } from "./log-level"; import { type ReadFile } from "./read-file"; import type { CoverageMap } from "./coverage-map"; import { type Thresholds, thresholdTypes } from "./threshold"; import type { ProcessCoverage } from "./process-coverage"; /** * One Double Zero, itself */ export interface OneDoubleZero { /** * From a process coverage, returns the coverage map of an arbitrary set of source files. * * @param sourceFiles The source files to get the coverage map for * @param processCoverage The process coverage to get the coverage map from * @param logLevel The level of information to log during the execution of the function * @param ignoreUnhitSourceFiles Whether unhit source files should be ignored or not */ getCoverageMap(sourceFiles: Array, processCoverage: ProcessCoverage, logLevel?: LogLevel, ignoreUnhitSourceFiles?: boolean): Promise; /** * Compares a coverage map with an arbitrary set of thresholds. * * @param coverageMap The coverage map to compare * @param thresholds The thresholds to be compared to * @param perFile Whether the result should be returned per file or globally */ compare(coverageMap: CoverageMap, thresholds: Thresholds, perFile: boolean): Array<{ actual: number; expectation: number; fileName: string | null; thresholdType: typeof thresholdTypes[number]; }>; } /** * Creates and returns an instance of One Double Zero. * * @param logInfo A function executed by the created instance whenever it needs to log some information * @param readFile A function executed by the created instance whenever it needs to read the content of a file * @return The newly created instance of One Double Zero */ export declare const createOneDoubleZero: (logInfo: LogInfo, readFile: ReadFile) => OneDoubleZero;