/** * Exact duplicate-body detection — the single implementation of the policy that * graph's `duplicated-function-body` rule and yagni's duplicate detector both consume * (ADR-0064). Pure over `CloneCandidate[]`; emits tool-agnostic findings (no `Signal`). * * Two complementary paths under one result: * 1. Per-instance (size-gated): groups of ≥2 byte-identical normalized bodies that * pass a line floor (default 5) AND a normalized-char floor (default 200) — the * char floor drops thin wrappers (`defineCheck`/pass-through) that share a body * but are never an extract target. The caller emits N-1 per group. * 2. Aggregate (cross-package): a body hash present in ≥ `minCrossPackagePackages` * (default 3) DISTINCT packages emits ONE aggregate and SUPPRESSES its * per-instance signals (a lighter body-size-only floor, default 80, no line floor). * * The hash already normalizes whitespace + strips comments (see `digestCanonicalBody`), * so identical hashes mean identical executable bodies. */ import type { CloneCandidate, DupOpts, DuplicateFindings } from './types.js'; /** * Detect exact duplicate function bodies. Returns cross-package aggregates plus the * per-instance groups that survive aggregate suppression. The caller wraps each into * its own signal/metadata. */ export declare function findDuplicateBodies(candidates: readonly CloneCandidate[], opts?: DupOpts): DuplicateFindings; /** * The kind/test-file exclusions shared by both code paths. Inline arrows / function * expressions / module-init occurrences are never an extract/hoist target; test-file * occurrences are excluded on both paths. */ export declare function isEligibleKind(occ: CloneCandidate): boolean; //# sourceMappingURL=find-duplicate-bodies.d.ts.map