UNPKG

archunit

Version:

ArchUnit TypeScript is an architecture testing library, to specify and assert architecture rules in your TypeScript app

25 lines (24 loc) 525 B
import ts from 'typescript'; export interface MethodInfo { name: string; accessedFields: string[]; } export interface FieldInfo { name: string; accessedBy: string[]; } export interface ClassInfo { name: string; filePath: string; methods: MethodInfo[]; fields: FieldInfo[]; sourceFile?: ts.SourceFile; } /** * Generic metric interface that all metrics should implement */ export interface Metric { name: string; calculate(classInfo: ClassInfo): number; description: string; }