UNPKG

refakts

Version:

TypeScript refactoring tool built for AI coding agents to perform precise refactoring operations via command line instead of requiring complete code regeneration.

30 lines 966 B
import { Project, Expression } from 'ts-morph'; export interface ExpressionMatch { expression: string; type: string; line: number; column: number; scope: string; node: Expression; } export interface ExpressionLocationResult { query: string; matches: ExpressionMatch[]; } export declare class ExpressionLocator { private project; private tsQueryHandler; private scopeAnalyzer; constructor(project?: Project); findExpressions(filePath: string, query: string): Promise<ExpressionLocationResult>; findExpressionsByRegex(filePath: string, pattern: string): Promise<ExpressionLocationResult>; private processExpressionQuery; private processExpressionRegex; private createExpressionMatches; private addExpressionMatch; private createExpressionMatch; private buildExpressionMatch; private loadSourceFile; private getAllExpressionNodes; } //# sourceMappingURL=expression-locator.d.ts.map