(result: FileEditResult)
| 49 | } |
| 50 | |
| 51 | function isFileWriteOutput(result: FileEditResult): result is FileWriteOutput { |
| 52 | return ( |
| 53 | 'type' in result && (result.type === 'create' || result.type === 'update') |
| 54 | ) |
| 55 | } |
| 56 | |
| 57 | function countHunkLines(hunks: StructuredPatchHunk[]): { |
| 58 | added: number |