/** * Dependency Graph * * Tracks relationships between production symbols for Tier 3 transitive coverage detection. * * Features: * - Track property, parameter, return type, and conformance dependencies * - Mark symbols as directly tested * - Calculate transitive coverage with path tracking * - Handle cycles safely * - Limit search depth for performance */ import type { SwiftSymbol } from '../schemas/gap.js'; export type NodeKind = 'class' | 'struct' | 'enum' | 'protocol' | 'actor' | 'function'; export type EdgeType = 'property' | 'parameter' | 'return' | 'conformance' | 'inheritance'; export interface DependencyNode { name: string; kind: NodeKind; testedBy: string[]; } export interface DependencyEdge { source: string; target: string; type: EdgeType; } export interface TransitiveCoverage { isCovered: boolean; via: string[]; path: string[]; depth: number; } export interface TransitiveOptions { maxDepth?: number; } export interface GraphJSON { nodes: Array<{ name: string; kind: string; }>; edges: Array<{ source: string; target: string; type: string; }>; testedSymbols: string[]; testMethods: Record; } /** * Extract dependencies from a symbol and its source content */ export declare function extractDependencies(symbol: SwiftSymbol, content: string): string[]; export declare class DependencyGraph { private nodes; private edges; private reverseEdges; addNode(name: string, kind: NodeKind | string): void; hasNode(name: string): boolean; getNode(name: string): DependencyNode | undefined; addEdge(source: string, target: string, type: EdgeType | string): void; getEdges(source: string): DependencyEdge[]; getDependencies(source: string): string[]; getDependents(target: string): string[]; markDirectlyTested(symbolName: string, testMethod: string): void; isDirectlyTested(symbolName: string): boolean; getTestedBy(symbolName: string): string[]; /** * Check if a symbol is transitively covered by tested dependencies */ getTransitiveCoverage(symbolName: string, options?: TransitiveOptions): TransitiveCoverage; get nodeCount(): number; get edgeCount(): number; get directCoveragePercent(): number; toJSON(): GraphJSON; static fromJSON(json: GraphJSON): DependencyGraph; } /** * Build a dependency graph from symbols and their source content */ export declare function buildDependencyGraph(symbols: SwiftSymbol[], contents: Map): DependencyGraph; //# sourceMappingURL=dependency-graph.d.ts.map