Skip to content

Commit 9c34f30

Browse files
committed
linedelimiters no longer exists on patch objects
kpdecker/jsdiff#518
1 parent 210a3cd commit 9c34f30

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

types/diff/index.d.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ export interface PatchOptions extends LinesOptions {
7979
}
8080

8181
export interface ApplyPatchOptions {
82+
/**
83+
* If `true`, and if the file to be patched consistently uses different line endings to the patch (i.e. either the file always uses Unix line endings while the patch uses Windows ones, or vice versa), then `applyPatch` will behave as if the line endings in the patch were the same as those in the source file. (If `false`, the patch will usually fail to apply in such circumstances since lines deleted in the patch won't be considered to match those in the source file.) Defaults to `true`.
84+
*/
85+
autoConvertLineEndings?: boolean | undefined;
86+
8287
/**
8388
* Number of lines that are allowed to differ before rejecting a patch.
8489
* @default 0
@@ -145,8 +150,6 @@ export interface Hunk {
145150
newStart: number;
146151
newLines: number;
147152
lines: string[];
148-
// Line Delimiters is only returned by parsePatch()
149-
linedelimiters?: string[];
150153
}
151154

152155
export interface BestPath {

0 commit comments

Comments
 (0)