import { ContextLink } from '../../../domain/types/index.js'; export declare class ContextScanner { /** * Scan a project directory for React Context patterns. * Discovers createContext() calls, useContext() consumers, * custom hook wrappers (e.g., useHeaderContext), and Provider * JSX usage to build a map of context-based state propagation paths. * * @param projectRoot - Absolute path to the project root * @returns Array of ContextLink objects describing discovered context relationships */ scan(projectRoot: string): ContextLink[]; private collectFiles; private findContextDefinitions; private findContextUsages; /** * Find custom hook wrappers that internally call useContext(XxxContext). * E.g., `export const useHeaderContext = () => { const ctx = useContext(HeaderContext); ... }` * Returns a Map: contextName → Set of custom hook names (e.g., "useHeaderContext") */ private findCustomHookWrappers; /** * Scan a source file for calls to custom hook wrappers. * E.g., `useHeaderContext()` in DynamicHeader.tsx */ private findCustomHookCalls; private findProviderUsages; private extractPropagatedProperties; /** * Infer the component name from a source file. * Tries: export default function Xxx, export function Xxx, * function Xxx, const Xxx: React.FC, const Xxx = () =>, * or falls back to the filename. */ private inferComponentName; } //# sourceMappingURL=scanner.d.ts.map