UNPKG

dry-ts

Version:

Find candidate duplicate TypeScript code by comparing normalized AST structure.

19 lines (18 loc) 816 B
import type { Cluster, ClusterLocation, Location } from "./types.js"; export declare class ClusterCollector { private readonly parents; private readonly locationsByKey; private readonly scoresByRoot; addMatch(left: ClusterLocation, right: ClusterLocation, score: number): void; clusters(): Cluster[]; private find; private add; private union; private addScore; } export declare function maxScore(cluster: Cluster): number; export declare function minScore(cluster: Cluster): number; export declare function locationKey(location: Location): string; export declare function compareLocations(left: Location, right: Location): number; export declare function crossFileSharedNames(cluster: Cluster): string[]; export declare function hasCrossFileSharedName(cluster: Cluster): boolean;