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.

26 lines 1.01 kB
import { RefactoringCommand, CommandOptions } from '../command'; export declare class ExtractVariableCommand implements RefactoringCommand { readonly name = "extract-variable"; readonly description = "Extract expression into a variable"; readonly complete = true; private astService; private scopeAnalyzer; private nameValidator; private statementInserter; execute(file: string, options: CommandOptions): Promise<void>; private findTargetNode; validateOptions(options: CommandOptions): void; getHelpText(): string; private performExtraction; private extractSingleOccurrence; private extractAllOccurrences; private findAllMatchingExpressions; private validateExpressionNode; private validateExpressionsFound; private groupExpressionsByScope; private addExpressionToScope; private extractInEachScope; private findMatchingExpressions; private addMatchingExpression; } //# sourceMappingURL=extract-variable-command.d.ts.map