import type { NodeMetric } from "audit-tools/shared"; /** True for the JS/TS source files these metrics are defined over. */ export declare function isJsTsPath(path: string): boolean; /** * Approximate cyclomatic complexity by counting branch/decision tokens plus a * base path of 1. Lexical (no parse) → tagged `cyclomatic-approx`. Returns * `undefined` for non-js/ts source. */ export declare function computeComplexityMetric(path: string, source: string): NodeMetric | undefined; /** * Duplication measure: the count of non-trivial source lines that appear more * than once (i.e. the number of duplicated line occurrences, excluding the * first occurrence of each). Lines are normalized (trimmed + whitespace * collapsed); blank lines and lines shorter than 3 chars are ignored as noise. * Tagged `duplicate-line-count`. Returns `undefined` for non-js/ts source. */ export declare function computeDuplicationMetric(path: string, source: string): NodeMetric | undefined; /** * Compute both metrics for one file. Returns `undefined` for non-js/ts source * (so the caller records no entry at all). For js/ts, always returns both a * complexity and a duplication metric. */ export declare function computeNodeMetricsForFile(path: string, source: string): { complexity?: NodeMetric; duplication?: NodeMetric; } | undefined; //# sourceMappingURL=complexityDuplication.d.ts.map