addons/shared/patch/types.tsblame
View source
b69ab311/**
b69ab312 * Copyright (c) Meta Platforms, Inc. and affiliates.
b69ab313 *
b69ab314 * This source code is licensed under the MIT license found in the
b69ab315 * LICENSE file in the root directory of this source tree.
b69ab316 */
b69ab317
b69ab318export type Hunk = {
b69ab319 oldStart: number;
b69ab3110 oldLines: number;
b69ab3111 newStart: number;
b69ab3112 newLines: number;
b69ab3113 lines: string[];
b69ab3114 linedelimiters: string[];
b69ab3115};
b69ab3116
b69ab3117export enum DiffType {
b69ab3118 Modified = 'Modified',
b69ab3119 Added = 'Added',
b69ab3120 Removed = 'Removed',
b69ab3121 Renamed = 'Renamed',
b69ab3122 Copied = 'Copied',
b69ab3123}
b69ab3124
b69ab3125export type ParsedDiff = {
b69ab3126 type?: DiffType;
b69ab3127 oldFileName?: string;
b69ab3128 newFileName?: string;
b69ab3129 oldMode?: string;
b69ab3130 newMode?: string;
b69ab3131 hunks: Hunk[];
b69ab3132};