import type { Rule } from 'eslint'; import { TSESTree } from '@typescript-eslint/utils'; export interface ImportReference { source: string; importedName: string; localName: string; } export interface WrapperFunctionInfo { originalFunction: string; parameterMapping: number; } export interface TrackedFunctions { styleFunctions: Set; recipeFunctions: Set; fontFaceFunctions: Set; globalFunctions: Set; keyframeFunctions: Set; } /** * Tracks vanilla-extract function imports and their local bindings */ export declare class ReferenceTracker { private imports; private trackedFunctions; private wrapperFunctions; private style; private recipe; constructor(options?: { style?: string[]; recipe?: string[]; }); /** * Processes import declarations to track vanilla-extract functions */ processImportDeclaration(node: TSESTree.ImportDeclaration): void; /** * Processes variable declarations to track re-assignments and destructuring */ processVariableDeclarator(node: TSESTree.VariableDeclarator): void; /** * Processes function declarations to detect wrapper functions */ processFunctionDeclaration(node: TSESTree.FunctionDeclaration): void; /** * Analyzes a function to see if it wraps a vanilla-extract function */ private analyzeWrapperFunction; /** * Analyzes a wrapper function expression to detect vanilla-extract calls and parameter mapping */ private analyzeWrapperExpression; /** * Checks if a node is a vanilla-extract function call */ private checkForVanillaExtractCall; /** * Traverses a block statement to find vanilla-extract calls */ private traverseBlockForVanillaExtractCalls; /** * Checks if a function name corresponds to a tracked vanilla-extract function */ isTrackedFunction(functionName: string): boolean; /** * Gets the category of a tracked function */ getFunctionCategory(functionName: string): keyof TrackedFunctions | null; /** * Gets the original imported name for a local function name */ getOriginalName(localName: string): string | null; /** * Gets wrapper function information */ getWrapperInfo(functionName: string): WrapperFunctionInfo | null; /** * Gets all tracked functions by category */ getTrackedFunctions(): TrackedFunctions; /** * Resets the tracker state (useful for processing multiple files) */ reset(): void; private isVanillaExtractSource; private getCustomWrapper; private categorizeFunction; } /** * Creates a visitor that tracks vanilla-extract imports and bindings */ export declare function createReferenceTrackingVisitor(tracker: ReferenceTracker): Rule.RuleListener;