import type { Range } from "./file-coverage"; export interface Branch { readonly range: Range; readonly count: number; } export interface BinaryBranchCoverage { branches: [consequentBranch: Branch] | [consequentBranch: Branch, alternateBranch: Branch]; range: Range; } export interface BinaryExpressionBranchCoverage extends BinaryBranchCoverage { type: 'binary-expr'; } export interface ConditionalExpressionBranchCoverage extends BinaryBranchCoverage { type: 'cond-expr'; } export interface IfBranchCoverage extends BinaryBranchCoverage { type: 'if'; } export interface SwitchBranchCoverage { branches: Array; range: Range; type: 'switch'; } export type BranchCoverage = BinaryExpressionBranchCoverage | ConditionalExpressionBranchCoverage | IfBranchCoverage | SwitchBranchCoverage;