refakts
Version:
TypeScript refactoring tool built for AI coding agents to perform precise refactoring operations via command line instead of requiring complete code regeneration.
22 lines • 817 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.StructuralSelectionStrategy = void 0;
const structural_analyzer_1 = require("../services/structural-analyzer");
class StructuralSelectionStrategy {
constructor() {
this.structuralAnalyzer = new structural_analyzer_1.StructuralAnalyzer();
}
canHandle(options) {
return !!options.structural;
}
async select(sourceFile, options) {
return this.structuralAnalyzer.findStructuralMatches(sourceFile, options);
}
validateOptions(options) {
if (!options.regex) {
throw new Error('--regex must be specified with --structural');
}
}
}
exports.StructuralSelectionStrategy = StructuralSelectionStrategy;
//# sourceMappingURL=structural-selection-strategy.js.map