(
edits: StateEdit[],
options?: StateApplyEditsOptions
)
| 414 | } |
| 415 | |
| 416 | async applyEdits( |
| 417 | edits: StateEdit[], |
| 418 | options?: StateApplyEditsOptions |
| 419 | ): Promise<StateApplyEditsResult> { |
| 420 | return applyTextEdits( |
| 421 | edits, |
| 422 | async (path) => { |
| 423 | try { |
| 424 | return await this.readFile(path); |
| 425 | } catch (error) { |
| 426 | if (isEnoent(error)) return null; |
| 427 | throw error; |
| 428 | } |
| 429 | }, |
| 430 | this.writeFile.bind(this), |
| 431 | this.deleteFile.bind(this), |
| 432 | options |
| 433 | ); |
| 434 | } |
| 435 | |
| 436 | // ── Private helpers ─────────────────────────────────────────────── |
| 437 |
no test coverage detected