astx
Version:
super powerful structural search and replace for JavaScript and TypeScript to automate your refactoring
10 lines (9 loc) • 581 B
TypeScript
import { Node } from './types';
import { Match } from './find';
import { CompiledReplacement } from './compileReplacement';
import { Backend } from './backend/Backend';
export declare type ReplaceOptions = {
backend: Backend;
};
export default function replace(match: Match, replace: CompiledReplacement | Node | readonly Node[], { backend }: ReplaceOptions): void;
export declare function replaceAll(matches: Match[], replace: CompiledReplacement | Node | readonly Node[] | ((match: Match) => CompiledReplacement | Node | readonly Node[]), { backend }: ReplaceOptions): void;