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.

20 lines 706 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NodeFinderFactory = void 0; const tsquery_node_finder_1 = require("./tsquery-node-finder"); const regex_node_finder_1 = require("./regex-node-finder"); class NodeFinderFactory { static create(options) { if (options.regex) { return new regex_node_finder_1.RegexNodeFinder(); } else if (options.query) { return new tsquery_node_finder_1.TSQueryNodeFinder(); } else { throw new Error('Either --query or --regex must be specified'); } } } exports.NodeFinderFactory = NodeFinderFactory; //# sourceMappingURL=node-finder-factory.js.map