import * as ts from 'typescript/lib/tsserverlibrary'; import { ClassNameInfo, ExtractionContext } from '../core/types'; import { BaseExtractor } from './BaseExtractor'; /** * Extracts class names from variable references by resolving their declarations. * Errors point to the actual class name in the declaration, with context about * where the variable is used. * * Handles cases like: * - const dynamicClass = 'bg-blue-500'; *
* * - const classes = isActive ? 'bg-blue-500' : 'bg-gray-500'; *
*/ export declare class VariableReferenceExtractor extends BaseExtractor { canHandle(node: ts.Node, context: ExtractionContext): boolean; extract(node: ts.Node, context: ExtractionContext): ClassNameInfo[]; /** * Extract class names from an identifier by resolving its declaration */ extractFromIdentifier(identifier: ts.Identifier, context: ExtractionContext): ClassNameInfo[]; /** * Extract class names from an initializer expression * Reports errors at the declaration position (where the string literal is) */ private extractFromInitializer; /** * Extract class names from a string literal, pointing errors at the literal position * Handles both single-line and multiline strings with various whitespace */ private extractFromStringLiteralWithUsage; /** * Extract class names from text, tracking offsets for accurate positions */ private extractClassNamesFromText; } //# sourceMappingURL=VariableReferenceExtractor.d.ts.map