UNPKG

sicua

Version:

A tool for analyzing project structure and dependencies

31 lines (30 loc) 1.19 kB
import ts from "typescript"; import { FileContextType, ComplexityLevel, DependencyPurpose, ReactPattern, ExportType } from "../types"; /** * Determines the file context type based on file path, content, and AST */ export declare function determineFileContextType(filePath: string, content: string, sourceFile: ts.SourceFile): FileContextType; /** * Calculates complexity level based on various metrics */ export declare function calculateComplexityLevel(sourceFile: ts.SourceFile, content: string): ComplexityLevel; /** * Determines dependency purpose based on package name */ export declare function getDependencyPurpose(packageName: string): DependencyPurpose; /** * Identifies React patterns in the source file */ export declare function identifyReactPatterns(sourceFile: ts.SourceFile, content: string): ReactPattern[]; /** * Determines export type from AST node */ export declare function getExportType(node: ts.Node): ExportType; /** * Estimates token count for a given text */ export declare function estimateTokenCount(text: string): number; /** * Sanitizes file path for display */ export declare function sanitizeFilePath(filePath: string, srcDir: string): string;