653 BTypeScriptView Raw
1import * as ts from 'typescript';
2import { Fix } from '@fimbul/ymir';
3export interface FixResult {
4 result: string;
5 fixed: number;
6 range: ts.TextChangeRange;
9 * Tries to apply all fixes. The replacements of all fixes are sorted by index ascending.
10 * They are then applied in order. If a replacement overlaps (or touches) the range of the previous replacement,
11 * the process rolls back to the state before the first replacement of the offending fix was applied. The replacements
12 * of this fix are not applied again.
13 * At least one fix will be applied.
14 */
15export declare function applyFixes(source: string, fixes: Fix[]): FixResult;