635 B33 lines
Blame
1/**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8export type Hunk = {
9 oldStart: number;
10 oldLines: number;
11 newStart: number;
12 newLines: number;
13 lines: string[];
14 linedelimiters: string[];
15};
16
17export enum DiffType {
18 Modified = 'Modified',
19 Added = 'Added',
20 Removed = 'Removed',
21 Renamed = 'Renamed',
22 Copied = 'Copied',
23}
24
25export type ParsedDiff = {
26 type?: DiffType;
27 oldFileName?: string;
28 newFileName?: string;
29 oldMode?: string;
30 newMode?: string;
31 hunks: Hunk[];
32};
33