import { SourceFile, FunctionDeclaration, ArrowFunction, FunctionExpression } from 'ts-morph'; import type { StateNode, ComponentNode, PropUsage, EnhancedContextUsage, ScopeEntry, PropRename } from '../types.js'; export interface ParsedComponent { component: ComponentNode; stateNodes: StateNode[]; jsxChildren: JsxChildInfo[]; functionNode: FunctionDeclaration | ArrowFunction | FunctionExpression; } export interface JsxPropBundleInfo { propName: string; properties: string[]; isObjectLiteral: boolean; estimatedSize: number; } export interface JsxChildInfo { componentName: string; props: Map; line: number; bundleProps: JsxPropBundleInfo[]; } export declare function resetIdCounter(): void; /** * Analyzes how props are used within a component function */ export declare function analyzePropsUsage(func: FunctionDeclaration | ArrowFunction | FunctionExpression, propNames: string[]): PropUsage[]; /** * Extracts enhanced information about useContext calls, including destructured fields */ export declare function extractEnhancedContextUsage(func: FunctionDeclaration | ArrowFunction | FunctionExpression, filePath: string): EnhancedContextUsage[]; /** * Builds a scope map tracking how variables relate to props */ export declare function buildScopeMap(func: FunctionDeclaration | ArrowFunction | FunctionExpression, propNames: string[], componentId: string, componentName: string, filePath: string): { scopeMap: Map; renames: PropRename[]; }; /** * Resolves a variable name to its original prop name using scope map */ export declare function resolveToOriginalProp(name: string, scopeMap: Map, propNames: string[]): string | null; export declare function parseFile(sourceFile: SourceFile): ParsedComponent[]; //# sourceMappingURL=file-parser.d.ts.map