UNPKG

code-complexity

Version:

Measure the churn/complexity score. Higher values mean hotspots where refactorings should happen.

21 lines (20 loc) 648 B
import { Options, Path } from "./types"; export interface IStatistics { path: Path; churn: number; complexity: number; score: number; } export default class Statistics { readonly path: Path; readonly churn: number; readonly complexity: number; readonly score: number; private readonly directories; static compute(options: Options): Promise<Statistics[]>; static toStatistics(churns: Map<Path, number>, complexities: Map<Path, number>): (path: Path) => Statistics; private static buildDirectoriesStatistics; private constructor(); private findDirectoriesForFile; toState(): IStatistics; }