(text: string, edits: Edit[])
| 245 | }; |
| 246 | |
| 247 | const applyEdits = (text: string, edits: Edit[]): string => { |
| 248 | // Apply in reverse order so positions stay valid. |
| 249 | const sorted = [...edits].sort((a, b) => b.start - a.start); |
| 250 | let out = text; |
| 251 | for (const edit of sorted) { |
| 252 | out = out.slice(0, edit.start) + edit.replacement + out.slice(edit.end); |
| 253 | } |
| 254 | return out; |
| 255 | }; |
| 256 | |
| 257 | // --------------------------------------------------------------------------- |
| 258 | // Pass 1 — discover every migrated class name (cross-file) so we can rewrite |
no outgoing calls
no test coverage detected