()
| 342 | |
| 343 | let currentIndex = 0; |
| 344 | function processIndex(): void { |
| 345 | const index = spDiff[currentIndex++]; |
| 346 | if (!index) { |
| 347 | return options.complete(); |
| 348 | } |
| 349 | |
| 350 | options.loadFile(index, function(err: any, data: string) { |
| 351 | if (err) { |
| 352 | return options.complete(err); |
| 353 | } |
| 354 | |
| 355 | const updatedContent = applyPatch(data, index, options); |
| 356 | options.patched(index, updatedContent, function(err: any) { |
| 357 | if (err) { |
| 358 | return options.complete(err); |
| 359 | } |
| 360 | |
| 361 | processIndex(); |
| 362 | }); |
| 363 | }); |
| 364 | } |
| 365 | processIndex(); |
| 366 | } |
no test coverage detected