highest
The highest level of a set of findings.
import { levelOf } from "#codebase/tcmts/cli/semver_checks"; import type { Finding, Level } from "#codebase/tcmts/cli/semver_checks"; export function highest(findings: Finding[]): Level | undefined { for (const l of ["major", "minor", "patch"] as Level[]) if (findings.some((f) => levelOf(f) === l)) return l; return undefined; }