UNPKG

astx

Version:

super powerful structural search and replace for JavaScript and TypeScript to automate your refactoring

30 lines (29 loc) 978 B
/// <reference types="node" /> import { Fs as RunTransformOnFileFs } from './runTransformOnFile'; import { AstxConfig } from '../AstxConfig'; import { Fs as GlobFs } from './glob'; import { Transform, TransformResult } from '../Astx'; import Gitignore from 'gitignore-fs'; declare type Fs = GlobFs & RunTransformOnFileFs; export declare type Progress = { type: 'progress'; completed: number; total: number; globDone: boolean; }; export declare type RunTransformOptions = { gitignore?: Gitignore | null; transform?: Transform; transformFile?: string; paths?: readonly string[]; exclude?: string; cwd?: string; config?: Partial<AstxConfig>; signal?: AbortSignal; fs?: Fs; }; export default function runTransform({ gitignore, transform: _transform, transformFile, paths: _paths, exclude, fs, cwd, config, signal, }: RunTransformOptions): AsyncIterable<{ type: 'result'; result: TransformResult; } | Progress>; export {};