UNPKG

521 BTypeScriptView Raw
1/**
2 * Parse a string that represents a git patch
3 * @param {String} contents The contents of the patch to parse
4 * @return {Object} An object where the keys are filenames, and the
5 * values are the contents of the diff
6 */
7export declare function parsePatch(contents: any): {
8 files: {};
9 sha: any;
10 message: string;
11};
12export declare function parseMultiPatch(contents: any): {
13 files: {};
14 sha: any;
15 message: string;
16}[];
17export declare function parseUnifiedDiff(diffContents: any): any[];